*add 11 new event hooks to the OnEvents system, by Hawthorne

--HG--
branch : trunk
This commit is contained in:
maximius
2009-09-23 20:19:21 -07:00
parent 8102372a67
commit 906b00465a
16 changed files with 319 additions and 6 deletions
+21 -1
View File
@@ -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();
}