Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Update TeamForRace. Fix by chipleo.
Browse files Browse the repository at this point in the history
Removed the flushbits everyone was crying about.

Signed-off-by: AlterEgo <[email protected]>
  • Loading branch information
SkyFire committed Mar 3, 2018
1 parent a1a27f9 commit cd52348
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/server/game/Entities/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 0 additions & 2 deletions src/server/game/Handlers/NPCHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions src/server/game/Miscellaneous/SharedDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit cd52348

Please sign in to comment.