Code Style: tab to spaces
--HG-- branch : trunk
This commit is contained in:
@@ -47,7 +47,7 @@ ArenaTeam::ArenaTeam()
|
||||
m_stats.games_season = 0;
|
||||
m_stats.rank = 0;
|
||||
if (sWorld.getConfig(CONFIG_ARENA_START_RATING)>=0)
|
||||
m_stats.rating = sWorld.getConfig(CONFIG_ARENA_START_RATING);
|
||||
m_stats.rating = sWorld.getConfig(CONFIG_ARENA_START_RATING);
|
||||
else if (sWorld.getConfig(CONFIG_ARENA_SEASON_ID) >= 6)
|
||||
m_stats.rating = 0;
|
||||
else
|
||||
@@ -146,7 +146,7 @@ bool ArenaTeam::AddMember(const uint64& PlayerGuid)
|
||||
newmember.wins_season = 0;
|
||||
newmember.wins_week = 0;
|
||||
if (sWorld.getConfig(CONFIG_ARENA_START_PERSONAL_RATING) >= 0)
|
||||
newmember.personal_rating = sWorld.getConfig(CONFIG_ARENA_START_PERSONAL_RATING);
|
||||
newmember.personal_rating = sWorld.getConfig(CONFIG_ARENA_START_PERSONAL_RATING);
|
||||
else if (sWorld.getConfig(CONFIG_ARENA_SEASON_ID) >= 6)
|
||||
{
|
||||
if (m_stats.rating < 1000)
|
||||
@@ -199,7 +199,7 @@ bool ArenaTeam::LoadArenaTeamFromDB(QueryResult_AutoPtr arenaTeamDataResult)
|
||||
m_stats.games_season = fields[12].GetUInt32();
|
||||
m_stats.wins_season = fields[13].GetUInt32();
|
||||
m_stats.rank = fields[14].GetUInt32();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult_AutoPtr arenaTeamMembersResult)
|
||||
//prevent crash if db records are broken, when all members in result are already processed and current team hasn't got any members
|
||||
if (!fields)
|
||||
break;
|
||||
uint32 arenaTeamId = fields[0].GetUInt32();
|
||||
uint32 arenaTeamId = fields[0].GetUInt32();
|
||||
if (arenaTeamId < m_TeamId)
|
||||
{
|
||||
//there is in table arena_team_member record which doesn't have arenateamid in arena_team table, report error
|
||||
@@ -322,7 +322,7 @@ void ArenaTeam::Disband(WorldSession *session)
|
||||
// Removing from members is done in DelMember.
|
||||
DelMember(m_members.front().guid);
|
||||
}
|
||||
|
||||
|
||||
if (session)
|
||||
{
|
||||
if(Player *player = session->GetPlayer())
|
||||
|
||||
@@ -495,8 +495,8 @@ class BattleGround
|
||||
virtual void EventPlayerCapturedFlag(Player* /*player*/) {}
|
||||
void EventPlayerLoggedIn(Player* player, uint64 plr_guid);
|
||||
void EventPlayerLoggedOut(Player* player);
|
||||
virtual void EventPlayerDamagedGO(Player* /*player*/, GameObject* /*target_obj*/, uint32 /*eventId*/) {}
|
||||
virtual void EventPlayerUsedGO(Player* player, GameObject* go){}
|
||||
virtual void EventPlayerDamagedGO(Player* /*player*/, GameObject* /*target_obj*/, uint32 /*eventId*/) {}
|
||||
virtual void EventPlayerUsedGO(Player* player, GameObject* go){}
|
||||
|
||||
/* Death related */
|
||||
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
|
||||
|
||||
@@ -23,8 +23,8 @@ class BattleGround;
|
||||
|
||||
enum Buffs
|
||||
{
|
||||
OIL_REFINERY = 68719,
|
||||
QUARRY = 68720
|
||||
OIL_REFINERY = 68719,
|
||||
QUARRY = 68720
|
||||
};
|
||||
|
||||
class BattleGroundICScore : public BattleGroundScore
|
||||
|
||||
@@ -1393,10 +1393,10 @@ void BattleGroundMgr::BuildPvpLogDataPacket(WorldPacket *data, BattleGround *bg)
|
||||
case BATTLEGROUND_AA:
|
||||
case BATTLEGROUND_RL:
|
||||
case BATTLEGROUND_SA:
|
||||
*data << uint32(2);
|
||||
*data << uint32(((BattleGroundSAScore*)itr->second)->demolishers_destroyed);
|
||||
*data << uint32(((BattleGroundSAScore*)itr->second)->gates_destroyed);
|
||||
break;
|
||||
*data << uint32(2);
|
||||
*data << uint32(((BattleGroundSAScore*)itr->second)->demolishers_destroyed);
|
||||
*data << uint32(((BattleGroundSAScore*)itr->second)->gates_destroyed);
|
||||
break;
|
||||
case BATTLEGROUND_DS: // wotlk
|
||||
case BATTLEGROUND_RV: // wotlk
|
||||
case BATTLEGROUND_IC: // wotlk
|
||||
|
||||
+54
-54
@@ -76,9 +76,9 @@ bool BattleGroundSA::ResetObjs()
|
||||
for(uint8 i = 0; i < BG_SA_CENTRAL_FLAG; i++)
|
||||
{
|
||||
if(!AddObject(i,BG_SA_ObjEntries[i],
|
||||
BG_SA_ObjSpawnlocs[i][0],BG_SA_ObjSpawnlocs[i][1],
|
||||
BG_SA_ObjSpawnlocs[i][2],BG_SA_ObjSpawnlocs[i][3],
|
||||
0,0,0,0,RESPAWN_ONE_DAY))
|
||||
BG_SA_ObjSpawnlocs[i][0],BG_SA_ObjSpawnlocs[i][1],
|
||||
BG_SA_ObjSpawnlocs[i][2],BG_SA_ObjSpawnlocs[i][3],
|
||||
0,0,0,0,RESPAWN_ONE_DAY))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -87,8 +87,8 @@ bool BattleGroundSA::ResetObjs()
|
||||
for(uint8 i = 0; i < BG_SA_NPC_SPARKLIGHT; i++)
|
||||
{
|
||||
if(!AddCreature(BG_SA_NpcEntries[i], i, (attackers == TEAM_ALLIANCE ? TEAM_HORDE : TEAM_ALLIANCE),
|
||||
BG_SA_NpcSpawnlocs[i][0],BG_SA_NpcSpawnlocs[i][1],
|
||||
BG_SA_NpcSpawnlocs[i][2],BG_SA_NpcSpawnlocs[i][3]))
|
||||
BG_SA_NpcSpawnlocs[i][0],BG_SA_NpcSpawnlocs[i][1],
|
||||
BG_SA_NpcSpawnlocs[i][2],BG_SA_NpcSpawnlocs[i][3]))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -122,22 +122,22 @@ bool BattleGroundSA::ResetObjs()
|
||||
sg = sWorldSafeLocsStore.LookupEntry(BG_SA_GYEntries[i]);
|
||||
|
||||
if(!sg)
|
||||
{
|
||||
{
|
||||
sLog.outError("SOTA: Can't find GY entry %u",BG_SA_GYEntries[i]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(i == BG_SA_BEACH_GY)
|
||||
{
|
||||
{
|
||||
GraveyardStatus[i] = attackers;
|
||||
AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], ((attackers == TEAM_HORDE )? HORDE : ALLIANCE));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
GraveyardStatus[i] = ((attackers == TEAM_HORDE )? TEAM_ALLIANCE : TEAM_HORDE);
|
||||
if(!AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], ((attackers == TEAM_HORDE )? ALLIANCE : HORDE) ))
|
||||
sLog.outError("SOTA: couldn't spawn GY: %u",i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//GY capture points
|
||||
@@ -214,11 +214,11 @@ void BattleGroundSA::StartShips()
|
||||
if(p->GetTeamId() != attackers)
|
||||
continue;
|
||||
|
||||
UpdateData data;
|
||||
WorldPacket pkt;
|
||||
GetBGObject(i)->BuildValuesUpdateBlockForPlayer(&data, p);
|
||||
data.BuildPacket(&pkt);
|
||||
p->GetSession()->SendPacket(&pkt);
|
||||
UpdateData data;
|
||||
WorldPacket pkt;
|
||||
GetBGObject(i)->BuildValuesUpdateBlockForPlayer(&data, p);
|
||||
data.BuildPacket(&pkt);
|
||||
p->GetSession()->SendPacket(&pkt);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -234,11 +234,11 @@ void BattleGroundSA::Update(uint32 diff)
|
||||
{
|
||||
if(TotalTime >= BG_SA_WARMUPLENGTH)
|
||||
{
|
||||
TotalTime = 0;
|
||||
ToggleTimer();
|
||||
status = (status == BG_SA_WARMUP) ? BG_SA_ROUND_ONE : BG_SA_ROUND_TWO;
|
||||
TotalTime = 0;
|
||||
ToggleTimer();
|
||||
status = (status == BG_SA_WARMUP) ? BG_SA_ROUND_ONE : BG_SA_ROUND_TWO;
|
||||
}
|
||||
if(TotalTime >= BG_SA_BOAT_START)
|
||||
if(TotalTime >= BG_SA_BOAT_START)
|
||||
StartShips();
|
||||
return;
|
||||
}
|
||||
@@ -263,9 +263,9 @@ void BattleGroundSA::Update(uint32 diff)
|
||||
{
|
||||
if(TotalTime >= BG_SA_ROUNDLENGTH)
|
||||
{
|
||||
RoundScores[1].time = TotalTime;
|
||||
RoundScores[1].winner = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
|
||||
|
||||
RoundScores[1].time = TotalTime;
|
||||
RoundScores[1].winner = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
|
||||
|
||||
if (RoundScores[0].time == RoundScores[1].time)
|
||||
EndBattleGround(NULL);
|
||||
else if(RoundScores[0].time < RoundScores[1].time)
|
||||
@@ -339,12 +339,12 @@ void BattleGroundSA::AddPlayer(Player *plr)
|
||||
if(plr->GetTeamId() == attackers)
|
||||
{
|
||||
plr->CastSpell(plr,12438,true);//Without this player falls before boat loads...
|
||||
|
||||
|
||||
if(urand(0,1))
|
||||
plr->TeleportTo(607, 2682.936f, -830.368f, 50.0f, 2.895f, 0);
|
||||
else
|
||||
plr->TeleportTo(607, 2577.003f, 980.261f, 50.0f, 0.807f, 0);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
plr->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
|
||||
@@ -408,11 +408,11 @@ void BattleGroundSA::TeleportPlayers()
|
||||
if(plr->GetTeamId() == attackers)
|
||||
{
|
||||
plr->CastSpell(plr,12438,true); //Without this player falls before boat loads...
|
||||
|
||||
|
||||
if(urand(0,1))
|
||||
plr->TeleportTo(607, 2682.936f, -830.368f, 50.0f, 2.895f, 0);
|
||||
else
|
||||
plr->TeleportTo(607, 2577.003f, 980.261f, 50.0f, 0.807f, 0);
|
||||
plr->TeleportTo(607, 2577.003f, 980.261f, 50.0f, 0.807f, 0);
|
||||
}
|
||||
else
|
||||
plr->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
|
||||
@@ -468,14 +468,14 @@ void BattleGroundSA::OverrideGunFaction()
|
||||
for(uint8 i = BG_SA_GUN_1; i <= BG_SA_GUN_10;i++)
|
||||
{
|
||||
if(Creature* gun = GetBGCreature(i))
|
||||
gun->setFaction(BG_SA_Factions[attackers? TEAM_ALLIANCE : TEAM_HORDE]);
|
||||
}
|
||||
gun->setFaction(BG_SA_Factions[attackers? TEAM_ALLIANCE : TEAM_HORDE]);
|
||||
}
|
||||
|
||||
for(uint8 i = BG_SA_DEMOLISHER_1; i <= BG_SA_DEMOLISHER_4;i++)
|
||||
{
|
||||
{
|
||||
if(Creature* dem = GetBGCreature(i))
|
||||
dem->setFaction(BG_SA_Factions[attackers]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BattleGroundSA::DestroyGate(uint32 i, Player* pl)
|
||||
@@ -496,24 +496,24 @@ void BattleGroundSA::DestroyGate(uint32 i, Player* pl)
|
||||
break;
|
||||
case 1:
|
||||
uws = BG_SA_YELLOW_GATEWS;
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
case 2:
|
||||
uws = BG_SA_BLUE_GATEWS;
|
||||
break;
|
||||
case 3:
|
||||
uws = BG_SA_RED_GATEWS;
|
||||
break;
|
||||
case 4:
|
||||
uws = BG_SA_PURPLE_GATEWS;
|
||||
break;
|
||||
case 5:
|
||||
uws = BG_SA_ANCIENT_GATEWS;
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
case 3:
|
||||
uws = BG_SA_RED_GATEWS;
|
||||
break;
|
||||
case 4:
|
||||
uws = BG_SA_PURPLE_GATEWS;
|
||||
break;
|
||||
case 5:
|
||||
uws = BG_SA_ANCIENT_GATEWS;
|
||||
break;
|
||||
default:
|
||||
ASSERT(false);
|
||||
break;
|
||||
}
|
||||
|
||||
if(i < 5)
|
||||
DelObject(i+9);
|
||||
UpdateWorldState(uws, GateStatus[i]);
|
||||
@@ -599,8 +599,8 @@ void BattleGroundSA::CaptureGraveyard(BG_SA_Graveyards i)
|
||||
SpawnBGObject(BG_SA_LEFT_FLAG,RESPAWN_ONE_DAY);
|
||||
npc = BG_SA_NPC_RIGSPARK;
|
||||
AddCreature(BG_SA_NpcEntries[npc], npc, attackers,
|
||||
BG_SA_NpcSpawnlocs[npc][0], BG_SA_NpcSpawnlocs[npc][1],
|
||||
BG_SA_NpcSpawnlocs[npc][2], BG_SA_NpcSpawnlocs[npc][3]);
|
||||
BG_SA_NpcSpawnlocs[npc][0], BG_SA_NpcSpawnlocs[npc][1],
|
||||
BG_SA_NpcSpawnlocs[npc][2], BG_SA_NpcSpawnlocs[npc][3]);
|
||||
UpdateWorldState(BG_SA_LEFT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE? 1:0));
|
||||
UpdateWorldState(BG_SA_LEFT_GY_HORDE, (GraveyardStatus[i] == TEAM_ALLIANCE? 0:1));
|
||||
break;
|
||||
@@ -608,8 +608,8 @@ void BattleGroundSA::CaptureGraveyard(BG_SA_Graveyards i)
|
||||
SpawnBGObject(BG_SA_RIGHT_FLAG, RESPAWN_ONE_DAY);
|
||||
npc = BG_SA_NPC_SPARKLIGHT;
|
||||
AddCreature(BG_SA_NpcEntries[npc], npc, attackers,
|
||||
BG_SA_NpcSpawnlocs[npc][0], BG_SA_NpcSpawnlocs[npc][1],
|
||||
BG_SA_NpcSpawnlocs[npc][2], BG_SA_NpcSpawnlocs[npc][3]);
|
||||
BG_SA_NpcSpawnlocs[npc][0], BG_SA_NpcSpawnlocs[npc][1],
|
||||
BG_SA_NpcSpawnlocs[npc][2], BG_SA_NpcSpawnlocs[npc][3]);
|
||||
UpdateWorldState(BG_SA_RIGHT_GY_ALLIANCE, (GraveyardStatus[i] == TEAM_ALLIANCE? 1:0));
|
||||
UpdateWorldState(BG_SA_RIGHT_GY_HORDE, (GraveyardStatus[i] == TEAM_ALLIANCE? 0:1));
|
||||
break;
|
||||
@@ -650,8 +650,8 @@ void BattleGroundSA::EventPlayerUsedGO(Player* Source, GameObject* object)
|
||||
EndBattleGround(RoundScores[0].winner == TEAM_ALLIANCE ? ALLIANCE : HORDE);
|
||||
else
|
||||
EndBattleGround(RoundScores[1].winner == TEAM_ALLIANCE ? ALLIANCE : HORDE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+26
-26
@@ -26,8 +26,8 @@ class BattleGroundSAScore : public BattleGroundScore
|
||||
public:
|
||||
BattleGroundSAScore(): demolishers_destroyed(0), gates_destroyed(0) {};
|
||||
virtual ~BattleGroundSAScore() {};
|
||||
uint8 demolishers_destroyed;
|
||||
uint8 gates_destroyed;
|
||||
uint8 demolishers_destroyed;
|
||||
uint8 gates_destroyed;
|
||||
};
|
||||
|
||||
enum BG_SA_Status
|
||||
@@ -300,14 +300,14 @@ class BattleGroundSA : public BattleGround
|
||||
virtual void AddPlayer(Player *plr);
|
||||
virtual void StartingEventCloseDoors();
|
||||
virtual void StartingEventOpenDoors();
|
||||
virtual bool SetupBattleGround();
|
||||
virtual void Reset();
|
||||
virtual void FillInitialWorldStates(WorldPacket& data);
|
||||
virtual void EventPlayerDamagedGO(Player* plr, GameObject* go, uint32 event);
|
||||
virtual void HandleKillUnit(Creature* unit, Player* killer);
|
||||
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
|
||||
virtual void EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj);
|
||||
virtual void EventPlayerUsedGO(Player* Source, GameObject* object);
|
||||
virtual bool SetupBattleGround();
|
||||
virtual void Reset();
|
||||
virtual void FillInitialWorldStates(WorldPacket& data);
|
||||
virtual void EventPlayerDamagedGO(Player* plr, GameObject* go, uint32 event);
|
||||
virtual void HandleKillUnit(Creature* unit, Player* killer);
|
||||
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
|
||||
virtual void EventPlayerClickedOnFlag(Player *Source, GameObject* target_obj);
|
||||
virtual void EventPlayerUsedGO(Player* Source, GameObject* object);
|
||||
|
||||
void EndBattleGround(uint32 winner);
|
||||
|
||||
@@ -319,21 +319,21 @@ class BattleGroundSA : public BattleGround
|
||||
void UpdatePlayerScore(Player *Source, uint32 type, uint32 value);
|
||||
|
||||
private:
|
||||
bool ResetObjs();
|
||||
void StartShips();
|
||||
void TeleportPlayers();
|
||||
void OverrideGunFaction();
|
||||
void DestroyGate(uint32 i, Player* pl);
|
||||
void SendTime();
|
||||
void CaptureGraveyard(BG_SA_Graveyards i);
|
||||
void ToggleTimer();
|
||||
TeamId attackers;
|
||||
uint32 TotalTime;
|
||||
bool ShipsStarted;
|
||||
BG_SA_GateState GateStatus[6];
|
||||
BG_SA_Status status;
|
||||
TeamId GraveyardStatus[BG_SA_MAX_GY];
|
||||
BG_SA_RoundScore RoundScores[2];
|
||||
bool TimerEnabled;
|
||||
bool ResetObjs();
|
||||
void StartShips();
|
||||
void TeleportPlayers();
|
||||
void OverrideGunFaction();
|
||||
void DestroyGate(uint32 i, Player* pl);
|
||||
void SendTime();
|
||||
void CaptureGraveyard(BG_SA_Graveyards i);
|
||||
void ToggleTimer();
|
||||
TeamId attackers;
|
||||
uint32 TotalTime;
|
||||
bool ShipsStarted;
|
||||
BG_SA_GateState GateStatus[6];
|
||||
BG_SA_Status status;
|
||||
TeamId GraveyardStatus[BG_SA_MAX_GY];
|
||||
BG_SA_RoundScore RoundScores[2];
|
||||
bool TimerEnabled;
|
||||
};
|
||||
#endif
|
||||
|
||||
+10
-10
@@ -1147,10 +1147,10 @@ void GameObject::Use(Unit* user)
|
||||
break;
|
||||
}
|
||||
|
||||
if (BattleGround* bg = player->GetBattleGround())
|
||||
{
|
||||
bg->EventPlayerUsedGO(player, this);
|
||||
}
|
||||
if (BattleGround* bg = player->GetBattleGround())
|
||||
{
|
||||
bg->EventPlayerUsedGO(player, this);
|
||||
}
|
||||
|
||||
player->CastedCreatureOrGO(info->id, GetGUID(), 0);
|
||||
}
|
||||
@@ -1593,12 +1593,12 @@ void GameObject::TakenDamage(uint32 damage, Unit *who)
|
||||
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DESTROYED);
|
||||
SetUInt32Value(GAMEOBJECT_DISPLAYID, m_goInfo->building.destroyedDisplayId);
|
||||
EventInform(m_goInfo->building.destroyedEvent);
|
||||
if(pwho)
|
||||
{
|
||||
if(BattleGround* bg = pwho->GetBattleGround())
|
||||
bg->EventPlayerDamagedGO(pwho, this, m_goInfo->building.destroyedEvent);
|
||||
}
|
||||
}
|
||||
if(pwho)
|
||||
{
|
||||
if(BattleGround* bg = pwho->GetBattleGround())
|
||||
bg->EventPlayerDamagedGO(pwho, this, m_goInfo->building.destroyedEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
else // from intact to damaged
|
||||
{
|
||||
|
||||
+1
-1
@@ -1585,7 +1585,7 @@ bool Group::InCombatToInstance(uint32 instanceId)
|
||||
Player *pPlayer = itr->getSource();
|
||||
if(pPlayer && pPlayer->getAttackers().size() && pPlayer->GetInstanceId() == instanceId && (pPlayer->GetMap()->IsRaidOrHeroicDungeon()))
|
||||
for (std::set<Unit*>::const_iterator i = pPlayer->getAttackers().begin(); i!=pPlayer->getAttackers().end(); ++i)
|
||||
if((*i) && (*i)->GetTypeId() == TYPEID_UNIT && (*i)->ToCreature()->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_INSTANCE_BIND)
|
||||
if((*i) && (*i)->GetTypeId() == TYPEID_UNIT && (*i)->ToCreature()->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_INSTANCE_BIND)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
+3
-3
@@ -234,7 +234,7 @@ bool Guild::LoadGuildFromDB(QueryResult_AutoPtr guildDataResult)
|
||||
}
|
||||
|
||||
bool Guild::CheckGuildStructure()
|
||||
{
|
||||
{
|
||||
// Repair the structure of guild
|
||||
// If the guildmaster doesn't exist or isn't the member of guild
|
||||
// attempt to promote another member
|
||||
@@ -359,7 +359,7 @@ bool Guild::LoadMembersFromDB(QueryResult_AutoPtr guildMembersResult)
|
||||
if (guildId > m_Id)
|
||||
//we loaded all members for this guild already, break cycle
|
||||
break;
|
||||
|
||||
|
||||
MemberSlot newmember;
|
||||
uint64 guid = MAKE_NEW_GUID(fields[1].GetUInt32(), 0, HIGHGUID_PLAYER);
|
||||
newmember.RankId = fields[2].GetUInt32();
|
||||
@@ -371,7 +371,7 @@ bool Guild::LoadMembersFromDB(QueryResult_AutoPtr guildMembersResult)
|
||||
newmember.OFFnote = fields[4].GetCppString();
|
||||
newmember.BankResetTimeMoney = fields[5].GetUInt32();
|
||||
newmember.BankRemMoney = fields[6].GetUInt32();
|
||||
for (uint8 i = 0; i < GUILD_BANK_MAX_TABS; ++i)
|
||||
for (uint8 i = 0; i < GUILD_BANK_MAX_TABS; ++i)
|
||||
{
|
||||
newmember.BankResetTimeTab[i] = fields[7+(2*i)].GetUInt32();
|
||||
newmember.BankRemSlotsTab[i] = fields[8+(2*i)].GetUInt32();
|
||||
|
||||
+4
-4
@@ -730,8 +730,8 @@ bool Item::HasEnchantRequiredSkill(const Player *pPlayer) const
|
||||
for (uint32 enchant_slot = PERM_ENCHANTMENT_SLOT; enchant_slot < MAX_ENCHANTMENT_SLOT; ++enchant_slot)
|
||||
if (uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot)))
|
||||
if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id))
|
||||
if (enchantEntry->requiredSkill && pPlayer->GetSkillValue(enchantEntry->requiredSkill) < enchantEntry->requiredSkillValue)
|
||||
return false;
|
||||
if (enchantEntry->requiredSkill && pPlayer->GetSkillValue(enchantEntry->requiredSkill) < enchantEntry->requiredSkillValue)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -746,8 +746,8 @@ uint32 Item::GetEnchantRequiredLevel() const
|
||||
for (uint32 enchant_slot = PERM_ENCHANTMENT_SLOT; enchant_slot < MAX_ENCHANTMENT_SLOT; ++enchant_slot)
|
||||
if (uint32 enchant_id = GetEnchantmentId(EnchantmentSlot(enchant_slot)))
|
||||
if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(enchant_id))
|
||||
if (enchantEntry->requiredLevel > level)
|
||||
level = enchantEntry->requiredLevel;
|
||||
if (enchantEntry->requiredLevel > level)
|
||||
level = enchantEntry->requiredLevel;
|
||||
|
||||
return level;
|
||||
}
|
||||
|
||||
+1
-1
@@ -5291,7 +5291,7 @@ bool ChatHandler::HandleResetTalentsCommand(const char * args)
|
||||
|
||||
ChatHandler(owner->ToPlayer()).SendSysMessage(LANG_RESET_PET_TALENTS);
|
||||
if(!m_session || m_session->GetPlayer()!=owner->ToPlayer())
|
||||
PSendSysMessage(LANG_RESET_PET_TALENTS_ONLINE,GetNameLink(owner->ToPlayer()).c_str());
|
||||
PSendSysMessage(LANG_RESET_PET_TALENTS_ONLINE,GetNameLink(owner->ToPlayer()).c_str());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
+2
-2
@@ -297,9 +297,9 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint16 flags) const
|
||||
// 0x08000000
|
||||
if(GetTypeId() == TYPEID_PLAYER && this->ToPlayer()->isInFlight())
|
||||
{
|
||||
//WPAssert(this->ToPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE);
|
||||
//WPAssert(this->ToPlayer()->GetMotionMaster()->GetCurrentMovementGeneratorType() == FLIGHT_MOTION_TYPE);
|
||||
|
||||
FlightPathMovementGenerator *fmg = (FlightPathMovementGenerator*)(const_cast<Player*>(this->ToPlayer())->GetMotionMaster()->top());
|
||||
FlightPathMovementGenerator *fmg = (FlightPathMovementGenerator*)(const_cast<Player*>(this->ToPlayer())->GetMotionMaster()->top());
|
||||
|
||||
uint32 flags3 = MOVEFLAG_GLIDE;
|
||||
|
||||
|
||||
+4
-4
@@ -318,10 +318,10 @@ class Object
|
||||
// FG: some hacky helpers
|
||||
void ForceValuesUpdateAtIndex(uint32);
|
||||
|
||||
Player* ToPlayer(){ if(GetTypeId() == TYPEID_PLAYER) return reinterpret_cast<Player*>(this); else return NULL; }
|
||||
const Player* ToPlayer() const { if(GetTypeId() == TYPEID_PLAYER) return (const Player*)((Player*)this); else return NULL; }
|
||||
Creature* ToCreature(){ if(GetTypeId() == TYPEID_UNIT) return reinterpret_cast<Creature*>(this); else return NULL; }
|
||||
const Creature* ToCreature() const {if(GetTypeId() == TYPEID_UNIT) return (const Creature*)((Creature*)this); else return NULL; }
|
||||
Player* ToPlayer(){ if(GetTypeId() == TYPEID_PLAYER) return reinterpret_cast<Player*>(this); else return NULL; }
|
||||
const Player* ToPlayer() const { if(GetTypeId() == TYPEID_PLAYER) return (const Player*)((Player*)this); else return NULL; }
|
||||
Creature* ToCreature(){ if(GetTypeId() == TYPEID_UNIT) return reinterpret_cast<Creature*>(this); else return NULL; }
|
||||
const Creature* ToCreature() const {if(GetTypeId() == TYPEID_UNIT) return (const Creature*)((Creature*)this); else return NULL; }
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
@@ -3285,7 +3285,7 @@ void ObjectMgr::LoadGuilds()
|
||||
{
|
||||
Guild *newGuild;
|
||||
uint32 count = 0;
|
||||
|
||||
|
||||
// 0 1 2 3 4 5 6
|
||||
QueryResult_AutoPtr result = CharacterDatabase.Query("SELECT guild.guildid,guild.name,leaderguid,EmblemStyle,EmblemColor,BorderStyle,BorderColor,"
|
||||
// 7 8 9 10 11 12
|
||||
@@ -3339,7 +3339,7 @@ void ObjectMgr::LoadGuilds()
|
||||
!newGuild->LoadBankRightsFromDB(guildBankTabRightsResult) ||
|
||||
!newGuild->CheckGuildStructure()
|
||||
)
|
||||
{
|
||||
{
|
||||
newGuild->Disband();
|
||||
delete newGuild;
|
||||
continue;
|
||||
|
||||
+2
-2
@@ -209,10 +209,10 @@ void PetAI::UpdateAI(const uint32 diff)
|
||||
{
|
||||
m_creature->SetInFront(target);
|
||||
if(target && target->GetTypeId() == TYPEID_PLAYER)
|
||||
m_creature->SendUpdateToPlayer(target->ToPlayer());
|
||||
m_creature->SendUpdateToPlayer(target->ToPlayer());
|
||||
|
||||
if(owner && owner->GetTypeId() == TYPEID_PLAYER)
|
||||
m_creature->SendUpdateToPlayer(owner->ToPlayer());
|
||||
m_creature->SendUpdateToPlayer(owner->ToPlayer());
|
||||
}
|
||||
|
||||
m_creature->AddCreatureSpellCooldown(spell->m_spellInfo->Id);
|
||||
|
||||
@@ -284,7 +284,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid
|
||||
}
|
||||
if (Unit* powner = pet->GetCharmerOrOwner())
|
||||
if(powner->GetTypeId() == TYPEID_PLAYER)
|
||||
pet->SendUpdateToPlayer(powner->ToPlayer());
|
||||
pet->SendUpdateToPlayer(powner->ToPlayer());
|
||||
result = SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -8762,7 +8762,7 @@ void Player::SendInitWorldStates(uint32 zoneid, uint32 areaid)
|
||||
break;
|
||||
case 3703: // Shattrath City
|
||||
case 4384: // Strand of the Ancients
|
||||
if (bg && bg->GetTypeID() == BATTLEGROUND_SA)
|
||||
if (bg && bg->GetTypeID() == BATTLEGROUND_SA)
|
||||
bg->FillInitialWorldStates(data);
|
||||
else
|
||||
{
|
||||
@@ -20107,7 +20107,7 @@ bool Player::canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList, bool
|
||||
|
||||
// player see other player with stealth/invisibility only if he in same group or raid or same team (raid/team case dependent from conf setting)
|
||||
if(!m_mover->canDetectInvisibilityOf(u))
|
||||
if(!(u->GetTypeId() == TYPEID_PLAYER && !IsHostileTo(u) && IsGroupVisibleFor(const_cast<Player*>(u->ToPlayer() ))))
|
||||
if(!(u->GetTypeId() == TYPEID_PLAYER && !IsHostileTo(u) && IsGroupVisibleFor(const_cast<Player*>(u->ToPlayer() ))))
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -20120,7 +20120,7 @@ bool Player::canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList, bool
|
||||
if(!isAlive())
|
||||
detect = false;
|
||||
if(m_DetectInvTimer < 300 || !HaveAtClient(u))
|
||||
if(!(u->GetTypeId() == TYPEID_PLAYER && !IsHostileTo(u) && IsGroupVisibleFor(const_cast<Player*>(u->ToPlayer()))))
|
||||
if(!(u->GetTypeId() == TYPEID_PLAYER && !IsHostileTo(u) && IsGroupVisibleFor(const_cast<Player*>(u->ToPlayer()))))
|
||||
if(!detect || !m_mover->canDetectStealthOf(u, GetDistance(u)))
|
||||
return false;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1344,7 +1344,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
{
|
||||
uint64 val = GetUInt64Value(PLAYER_QUEST_LOG_1_1 + slot * MAX_QUEST_OFFSET + QUEST_COUNTS_OFFSET);
|
||||
val &= ~((uint64)0xFFFF << (counter * 16));
|
||||
val |= ((uint64)count << (counter * 16));
|
||||
val |= ((uint64)count << (counter * 16));
|
||||
SetUInt64Value(PLAYER_QUEST_LOG_1_1 + slot * MAX_QUEST_OFFSET + QUEST_COUNTS_OFFSET, val);
|
||||
}
|
||||
void SetQuestSlotState(uint16 slot, uint32 state) { SetFlag(PLAYER_QUEST_LOG_1_1 + slot * MAX_QUEST_OFFSET + QUEST_STATE_OFFSET, state); }
|
||||
|
||||
@@ -183,19 +183,19 @@ uint32 Quest::XPValue( Player *pPlayer ) const
|
||||
int32 quest_level = (QuestLevel == -1 ? pPlayer->getLevel() : QuestLevel);
|
||||
xpentry = sQuestXPStore.LookupEntry(quest_level);
|
||||
if(!xpentry)
|
||||
return 0;
|
||||
return 0;
|
||||
|
||||
int diffFactor = 2 * (quest_level - pPlayer->getLevel()) + 20;
|
||||
|
||||
if (diffFactor < 1)
|
||||
diffFactor = 1;
|
||||
diffFactor = 1;
|
||||
else if (diffFactor > 10)
|
||||
diffFactor = 10;
|
||||
diffFactor = 10;
|
||||
|
||||
uint32 xp = diffFactor * xpentry->Exp[XPId] / 10;
|
||||
|
||||
if (xp <= 100)
|
||||
xp = 5 * ((xp + 2) / 5);
|
||||
xp = 5 * ((xp + 2) / 5);
|
||||
else if (xp <= 500)
|
||||
xp = 10 * ((xp + 5) / 10);
|
||||
else if (xp <= 1000)
|
||||
|
||||
+8
-8
@@ -1585,7 +1585,7 @@ struct ChainHealingOrder : public std::binary_function<const Unit*, const Unit*,
|
||||
/*if (Target == MainTarget)
|
||||
return 0;
|
||||
else*/ if (Target->GetTypeId() == TYPEID_PLAYER && MainTarget->GetTypeId() == TYPEID_PLAYER &&
|
||||
Target->ToPlayer()->IsInSameRaidWith(MainTarget->ToPlayer()))
|
||||
Target->ToPlayer()->IsInSameRaidWith(MainTarget->ToPlayer()))
|
||||
{
|
||||
if (Target->GetHealth() == Target->GetMaxHealth())
|
||||
return 40000;
|
||||
@@ -2915,13 +2915,13 @@ void Spell::cast(bool skipCheck)
|
||||
m_preCastSpell = 11196; // Recently Bandaged
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_MAGE:
|
||||
{
|
||||
// Permafrost
|
||||
if (m_spellInfo->SpellFamilyFlags[1] & 0x00001000 || m_spellInfo->SpellFamilyFlags[0] & 0x00100220)
|
||||
m_preCastSpell = 68391;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_MAGE:
|
||||
{
|
||||
// Permafrost
|
||||
if (m_spellInfo->SpellFamilyFlags[1] & 0x00001000 || m_spellInfo->SpellFamilyFlags[0] & 0x00100220)
|
||||
m_preCastSpell = 68391;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// traded items have trade slot instead of guid in m_itemTargetGUID
|
||||
// set to real guid to be sent later to the client
|
||||
|
||||
@@ -2440,7 +2440,7 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const
|
||||
switch(GetMiscValue())
|
||||
{
|
||||
case FORM_CAT:
|
||||
// Savage Roar
|
||||
// Savage Roar
|
||||
if (AuraEffect const * aurEff = target->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_DRUID, 0 , 0x10000000, 0))
|
||||
target->CastSpell(target, 62071, true);
|
||||
// Nurturing Instinct
|
||||
@@ -2697,7 +2697,7 @@ void AuraEffect::HandlePhase(AuraApplication const * aurApp, uint8 mode, bool ap
|
||||
// drop flag at invisible in bg
|
||||
if(target->ToPlayer()->InBattleGround())
|
||||
if(BattleGround *bg = target->ToPlayer()->GetBattleGround())
|
||||
bg->EventPlayerDroppedFlag(target->ToPlayer());
|
||||
bg->EventPlayerDroppedFlag(target->ToPlayer());
|
||||
|
||||
// GM-mode have mask 0xFFFFFFFF
|
||||
if(!target->ToPlayer()->isGameMaster())
|
||||
|
||||
@@ -915,10 +915,10 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
||||
case 48020: // Demonic Circle
|
||||
if(target->GetTypeId() == TYPEID_PLAYER)
|
||||
if(GameObject* obj = target->GetGameObject(48018))
|
||||
{
|
||||
target->ToPlayer()->TeleportTo(obj->GetMapId(),obj->GetPositionX(),obj->GetPositionY(),obj->GetPositionZ(),obj->GetOrientation());
|
||||
target->ToPlayer()->RemoveMovementImpairingAuras();
|
||||
}
|
||||
{
|
||||
target->ToPlayer()->TeleportTo(obj->GetMapId(),obj->GetPositionX(),obj->GetPositionY(),obj->GetPositionZ(),obj->GetOrientation());
|
||||
target->ToPlayer()->RemoveMovementImpairingAuras();
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1350,7 +1350,7 @@ void Spell::EffectDummy(uint32 i)
|
||||
return;
|
||||
|
||||
if(BattleGround* bg = m_caster->ToPlayer()->GetBattleGround())
|
||||
bg->EventPlayerDroppedFlag(m_caster->ToPlayer());
|
||||
bg->EventPlayerDroppedFlag(m_caster->ToPlayer());
|
||||
|
||||
m_caster->CastSpell(m_caster, 30452, true, NULL);
|
||||
return;
|
||||
@@ -7133,8 +7133,8 @@ void Spell::EffectTransmitted(uint32 effIndex)
|
||||
{
|
||||
if(m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
pGameObj->AddUniqueUse(m_caster->ToPlayer());
|
||||
m_caster->AddGameObject(pGameObj); // will removed at spell cancel
|
||||
pGameObj->AddUniqueUse(m_caster->ToPlayer());
|
||||
m_caster->AddGameObject(pGameObj); // will removed at spell cancel
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2846,9 +2846,9 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
|
||||
// Frostbite
|
||||
if (spellproto->SpellFamilyFlags[1] & 0x80000000)
|
||||
return DIMINISHING_TRIGGER_ROOT;
|
||||
// Frost Nova, Shatterd Barrier
|
||||
if (spellproto->SpellFamilyFlags[0] & 0x00080040)
|
||||
return DIMINISHING_CONTROL_ROOT;
|
||||
// Frost Nova, Shatterd Barrier
|
||||
if (spellproto->SpellFamilyFlags[0] & 0x00080040)
|
||||
return DIMINISHING_CONTROL_ROOT;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_ROGUE:
|
||||
|
||||
+13
-13
@@ -1272,20 +1272,20 @@ class SpellMgr
|
||||
return true;
|
||||
}
|
||||
|
||||
const SpellsRequiringSpellMap GetSpellsRequiringSpell()
|
||||
{
|
||||
return this->mSpellsReqSpell;
|
||||
}
|
||||
const SpellsRequiringSpellMap GetSpellsRequiringSpell()
|
||||
{
|
||||
return this->mSpellsReqSpell;
|
||||
}
|
||||
|
||||
uint32 GetSpellRequired(uint32 spell_id) const
|
||||
{
|
||||
SpellRequiredMap::const_iterator itr = mSpellReq.find(spell_id);
|
||||
|
||||
if(itr == mSpellReq.end())
|
||||
return NULL;
|
||||
|
||||
return itr->second;
|
||||
}
|
||||
uint32 GetSpellRequired(uint32 spell_id) const
|
||||
{
|
||||
SpellRequiredMap::const_iterator itr = mSpellReq.find(spell_id);
|
||||
|
||||
if(itr == mSpellReq.end())
|
||||
return NULL;
|
||||
|
||||
return itr->second;
|
||||
}
|
||||
|
||||
|
||||
// Modifiers
|
||||
|
||||
+13
-13
@@ -3091,9 +3091,9 @@ float Unit::GetUnitCriticalChance(WeaponAttackType attackType, const Unit *pVict
|
||||
if (attackType != RANGED_ATTACK)
|
||||
{
|
||||
crit -= pVictim->GetMeleeCritChanceReduction();
|
||||
// Glyph of barkskin
|
||||
if (pVictim->HasAura(63057) && pVictim->HasAura(22812))
|
||||
crit-=25.0f;
|
||||
// Glyph of barkskin
|
||||
if (pVictim->HasAura(63057) && pVictim->HasAura(22812))
|
||||
crit-=25.0f;
|
||||
}
|
||||
else
|
||||
crit -= pVictim->GetRangedCritChanceReduction();
|
||||
@@ -9254,7 +9254,7 @@ void Unit::SetMinion(Minion *minion, bool apply)
|
||||
else if (minion->isTotem())
|
||||
{
|
||||
// All summoned by totem minions must disappear when it is removed.
|
||||
if (const SpellEntry* spInfo = sSpellStore.LookupEntry(minion->ToTotem()->GetSpell()))
|
||||
if (const SpellEntry* spInfo = sSpellStore.LookupEntry(minion->ToTotem()->GetSpell()))
|
||||
for (int i = 0; i < MAX_SPELL_EFFECTS; ++i)
|
||||
{
|
||||
if (spInfo->Effect[i] != SPELL_EFFECT_SUMMON)
|
||||
@@ -11369,7 +11369,7 @@ void Unit::SetInCombatState(bool PvP, Unit* enemy)
|
||||
if (enemy)
|
||||
{
|
||||
if (IsAIEnabled)
|
||||
{
|
||||
{
|
||||
this->ToCreature()->AI()->EnterCombat(enemy);
|
||||
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);//always remove Out of Combat Non Attackable flag if we enter combat and AI is enabled
|
||||
}
|
||||
@@ -12173,7 +12173,7 @@ Unit* Creature::SelectVictim()
|
||||
for (AttackerSet::const_iterator itr = m_attackers.begin(); itr != m_attackers.end(); ++itr)
|
||||
{
|
||||
if ((*itr) && !canCreatureAttack(*itr) && (*itr)->GetTypeId() != TYPEID_PLAYER
|
||||
&& !(*itr)->ToCreature()->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
|
||||
&& !(*itr)->ToCreature()->HasUnitTypeMask(UNIT_MASK_CONTROLABLE_GUARDIAN))
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -14761,17 +14761,17 @@ void Unit::SetControlled(bool apply, UnitState state)
|
||||
break;
|
||||
case UNIT_STAT_CONFUSED:
|
||||
if (!hasUnitState(UNIT_STAT_STUNNED))
|
||||
{
|
||||
{
|
||||
SetConfused(true);
|
||||
CastStop();
|
||||
}
|
||||
CastStop();
|
||||
}
|
||||
break;
|
||||
case UNIT_STAT_FLEEING:
|
||||
if (!hasUnitState(UNIT_STAT_STUNNED | UNIT_STAT_CONFUSED))
|
||||
{
|
||||
{
|
||||
SetFeared(true);
|
||||
CastStop();
|
||||
}
|
||||
CastStop();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -15843,7 +15843,7 @@ void Unit::EnterVehicle(Vehicle *vehicle, int8 seatId)
|
||||
// drop flag at invisible in bg
|
||||
if(this->ToPlayer()->InBattleGround())
|
||||
if(BattleGround *bg = this->ToPlayer()->GetBattleGround())
|
||||
bg->EventPlayerDroppedFlag(this->ToPlayer());
|
||||
bg->EventPlayerDroppedFlag(this->ToPlayer());
|
||||
}
|
||||
|
||||
assert(!m_vehicle);
|
||||
|
||||
+2
-2
@@ -1852,7 +1852,7 @@ class Unit : public WorldObject
|
||||
static Creature* GetCreature(WorldObject& object, uint64 guid);
|
||||
|
||||
MotionMaster* GetMotionMaster(){ return &i_motionMaster; }
|
||||
|
||||
|
||||
bool IsStopped() const { return !(hasUnitState(UNIT_STAT_MOVING)); }
|
||||
void StopMoving();
|
||||
|
||||
@@ -1958,7 +1958,7 @@ class Unit : public WorldObject
|
||||
virtual bool isBeingLoaded() const { return false;}
|
||||
|
||||
Pet* ToPet(){ if(isPet()) return reinterpret_cast<Pet*>(this); else return NULL; }
|
||||
Totem* ToTotem(){ if(isTotem()) return reinterpret_cast<Totem*>(this); else return NULL; }
|
||||
Totem* ToTotem(){ if(isTotem()) return reinterpret_cast<Totem*>(this); else return NULL; }
|
||||
TempSummon* ToTempSummon() { if(isSummon()) return reinterpret_cast<TempSummon*>(this); else return NULL; }
|
||||
const TempSummon* ToTempSummon() const { if(isSummon()) return reinterpret_cast<const TempSummon*>(this); else return NULL; }
|
||||
|
||||
|
||||
@@ -329,7 +329,7 @@ void WorldSession::LogoutPlayer(bool Save)
|
||||
if(owner)
|
||||
{
|
||||
if(owner->GetTypeId() == TYPEID_PLAYER)
|
||||
aset.insert(owner->ToPlayer());
|
||||
aset.insert(owner->ToPlayer());
|
||||
}
|
||||
else
|
||||
if((*itr)->GetTypeId() == TYPEID_PLAYER)
|
||||
|
||||
Reference in New Issue
Block a user