mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 15:46:24 +00:00
Improved ScriptMgr with more hooks
This commit is contained in:
@@ -6946,6 +6946,12 @@ TeamId Player::TeamIdForRace(uint8 race)
|
||||
void Player::setFactionForRace(uint8 race)
|
||||
{
|
||||
m_team = TeamIdForRace(race);
|
||||
|
||||
sScriptMgr->OnPlayerUpdateFaction(this);
|
||||
|
||||
if (GetTeamId(true) != GetTeamId())
|
||||
return;
|
||||
|
||||
ChrRacesEntry const* rEntry = sChrRacesStore.LookupEntry(race);
|
||||
setFaction(rEntry ? rEntry->FactionID : 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user