From cd523488b101b3ba4933c9d10686a5898372dd50 Mon Sep 17 00:00:00 2001 From: AlterEgo Date: Sat, 3 Mar 2018 07:04:38 -0600 Subject: [PATCH] Update TeamForRace. Fix by chipleo. Removed the flushbits everyone was crying about. Signed-off-by: AlterEgo --- src/server/game/Entities/Player/Player.cpp | 5 +++-- src/server/game/Handlers/NPCHandler.cpp | 2 -- src/server/game/Miscellaneous/SharedDefines.h | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 5a52e43ff21..99cb351d8c8 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -3258,8 +3258,8 @@ void Player::GiveLevel(uint8 level) for (uint8 i = STAT_STRENGTH; i < MAX_STATS; ++i) SetCreateStat(Stats(i), info.stats[i]); - if (getLevel() >= sWorld->getIntConfig(CONFIG_START_PETBAR_LEVEL)) - PetSpellInitialize(); + if (getLevel() >= sWorld->getIntConfig(CONFIG_START_PETBAR_LEVEL)) + PetSpellInitialize(); SetCreateHealth(basehp); SetCreateMana(basemana); @@ -7114,6 +7114,7 @@ uint32 Player::TeamForRace(uint8 race) { case 1: return HORDE; case 7: return ALLIANCE; + case 42: return PANDAREN_NEUTRAL; } SF_LOG_ERROR("entities.player", "Race (%u) has wrong teamid (%u) in DBC: wrong DBC files?", uint32(race), rEntry->TeamID); } diff --git a/src/server/game/Handlers/NPCHandler.cpp b/src/server/game/Handlers/NPCHandler.cpp index 40ce43dc2a4..5b6372d1e02 100644 --- a/src/server/game/Handlers/NPCHandler.cpp +++ b/src/server/game/Handlers/NPCHandler.cpp @@ -410,8 +410,6 @@ void WorldSession::HandleGossipHelloOpcode(WorldPacket& recvData) uint8 bitsOrder[8] = { 2, 4, 0, 3, 6, 7, 5, 1 }; recvData.ReadBitInOrder(guid, bitsOrder); - recvData.FlushBits(); - uint8 bytesOrder[8] = { 4, 7, 1, 0, 5, 3, 6, 2 }; recvData.ReadBytesSeq(guid, bytesOrder); diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index 65fc14eaa5d..a42646eedae 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -886,6 +886,7 @@ enum Team { HORDE = 67, ALLIANCE = 469, + PANDAREN_NEUTRAL = 1249, // Pandaren is neutral on start //TEAM_STEAMWHEEDLE_CARTEL = 169, // not used in code //TEAM_ALLIANCE_FORCES = 891, //TEAM_HORDE_FORCES = 892,