*add 11 new event hooks to the OnEvents system, by Hawthorne
--HG-- branch : trunk
This commit is contained in:
+21
-1
@@ -2498,7 +2498,7 @@ void Player::GiveXP(uint32 xp, Unit* victim)
|
||||
level = getLevel();
|
||||
nextLvlXP = GetUInt32Value(PLAYER_NEXT_LEVEL_XP);
|
||||
}
|
||||
|
||||
newXP = GetSession()->HandleOnGetXP(newXP);
|
||||
SetUInt32Value(PLAYER_XP, newXP);
|
||||
}
|
||||
|
||||
@@ -6003,6 +6003,14 @@ void Player::CheckExploreSystem()
|
||||
if (isInFlight())
|
||||
return;
|
||||
|
||||
if(!m_AreaID)
|
||||
m_AreaID = GetAreaId();
|
||||
if(m_AreaID != GetAreaId())
|
||||
{
|
||||
m_AreaID = GetAreaId();
|
||||
GetSession()->HandleOnAreaChange(GetAreaEntryByAreaID(m_AreaID));
|
||||
}
|
||||
|
||||
uint16 areaFlag = GetBaseMap()->GetAreaFlag(GetPositionX(),GetPositionY(),GetPositionZ());
|
||||
if(areaFlag==0xffff)
|
||||
return;
|
||||
@@ -22089,3 +22097,15 @@ void Player::ActivateSpec(uint8 spec)
|
||||
SetPower(pw, 0);
|
||||
}
|
||||
|
||||
void Player::SetReputation(uint32 factionentry, uint32 value)
|
||||
{
|
||||
GetReputationMgr().SetReputation(sFactionStore.LookupEntry(factionentry),value);
|
||||
}
|
||||
uint32 Player::GetReputation(uint32 factionentry)
|
||||
{
|
||||
return GetReputationMgr().GetReputation(sFactionStore.LookupEntry(factionentry));
|
||||
}
|
||||
std::string Player::GetGuildName()
|
||||
{
|
||||
return objmgr.GetGuildById(GetGuildId())->GetName();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user