mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 02:46:33 +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)
|
void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recv_data)
|
||||||
{
|
{
|
||||||
// TODO: Move queries to prepared statements
|
|
||||||
uint64 guid;
|
uint64 guid;
|
||||||
std::string newname;
|
std::string newname;
|
||||||
uint8 gender, skin, face, hairStyle, hairColor, facialHair, race;
|
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);
|
sWorld->UpdateCharacterNameData(GUID_LOPART(guid), newname, gender, race);
|
||||||
|
|
||||||
|
if (oldRace == race)
|
||||||
|
return;
|
||||||
|
|
||||||
TeamId team = TEAM_ALLIANCE;
|
TeamId team = TEAM_ALLIANCE;
|
||||||
|
|
||||||
// Search each faction is targeted
|
// Search each faction is targeted
|
||||||
|
|||||||
Reference in New Issue
Block a user