mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
Core/Misc: Check if race is changed before performing faction-change actions. (By tibbi)
This commit is contained in:
@@ -1615,7 +1615,6 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket &recv_data)
|
||||
|
||||
void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
|
||||
{
|
||||
// TODO: Move queries to prepared statements
|
||||
uint64 guid;
|
||||
std::string newname;
|
||||
uint8 gender, skin, face, hairStyle, hairColor, facialHair, race;
|
||||
@@ -1732,6 +1731,9 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
|
||||
|
||||
sWorld->UpdateCharacterNameData(GUID_LOPART(guid), newname, gender, race);
|
||||
|
||||
if (oldRace == race)
|
||||
return;
|
||||
|
||||
TeamId team = TEAM_ALLIANCE;
|
||||
|
||||
// Search each faction is targeted
|
||||
|
||||
Reference in New Issue
Block a user