Core: Some more missing changes from previous commit (Pass by const reference for simple objects replaced with pass by value). Also fix unintended change
This commit is contained in:
@@ -120,7 +120,7 @@ class UnitAI
|
||||
virtual void DoAction(int32 const /*param*/) {}
|
||||
virtual uint32 GetData(uint32 /*id = 0*/) { return 0; }
|
||||
virtual void SetData(uint32 /*id*/, uint32 /*value*/) {}
|
||||
virtual void SetGUID(uint64 const&/*guid*/, int32 /*id*/ = 0) {}
|
||||
virtual void SetGUID(unit64 const/*guid*/, int32 /*id*/ = 0) {}
|
||||
virtual uint64 GetGUID(int32 /*id*/ = 0) { return 0; }
|
||||
|
||||
Unit* SelectTarget(SelectAggroTarget targetType, uint32 position = 0, float dist = 0.0f, bool playerOnly = false, int32 aura = 0);
|
||||
|
||||
@@ -53,7 +53,7 @@ ArenaTeam* ArenaTeamMgr::GetArenaTeamByName(const std::string& arenaTeamName) co
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ArenaTeam* ArenaTeamMgr::GetArenaTeamByCaptain(uint64 const& guid) const
|
||||
ArenaTeam* ArenaTeamMgr::GetArenaTeamByCaptain(unit64 const guid) const
|
||||
{
|
||||
for (ArenaTeamContainer::const_iterator itr = ArenaTeamStore.begin(); itr != ArenaTeamStore.end(); ++itr)
|
||||
if (itr->second->GetCaptain() == guid)
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
|
||||
ArenaTeam* GetArenaTeamById(uint32 arenaTeamId) const;
|
||||
ArenaTeam* GetArenaTeamByName(const std::string& arenaTeamName) const;
|
||||
ArenaTeam* GetArenaTeamByCaptain(uint64 const& guid) const;
|
||||
ArenaTeam* GetArenaTeamByCaptain(unit64 const guid) const;
|
||||
|
||||
void LoadArenaTeams();
|
||||
void AddArenaTeam(ArenaTeam* arenaTeam);
|
||||
|
||||
@@ -349,7 +349,7 @@ class BattlegroundEY : public Battleground
|
||||
void RespawnFlagAfterDrop();
|
||||
|
||||
void RemovePlayer(Player *plr, uint64 guid, uint32 team);
|
||||
void HandleBuffUse(uint64 const& buff_guid);
|
||||
void HandleBuffUse(unit64 const buff_guid);
|
||||
void HandleAreaTrigger(Player *Source, uint32 Trigger);
|
||||
void HandleKillPlayer(Player* player, Player* killer);
|
||||
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
|
||||
|
||||
@@ -85,7 +85,7 @@ void BattlegroundIC::SendTransportInit(Player* player)
|
||||
player->GetSession()->SendPacket(&packet);
|
||||
}
|
||||
|
||||
void BattlegroundIC::DoAction(uint32 action, uint64 const& var)
|
||||
void BattlegroundIC::DoAction(uint32 action, unit64 const var)
|
||||
{
|
||||
if (action != ACTION_TELEPORT_PLAYER_TO_TRANSPORT)
|
||||
return;
|
||||
|
||||
@@ -888,7 +888,7 @@ class BattlegroundIC : public Battleground
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& data);
|
||||
|
||||
void DoAction(uint32 action, uint64 const& var);
|
||||
void DoAction(uint32 action, unit64 const var);
|
||||
|
||||
virtual void HandlePlayerResurrect(Player* player);
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ class Corpse : public WorldObject, public GridObject<Corpse>
|
||||
void DeleteBonesFromWorld();
|
||||
void DeleteFromDB(SQLTransaction& trans);
|
||||
|
||||
uint64 const& GetOwnerGUID() const { return GetUInt64Value(CORPSE_FIELD_OWNER); }
|
||||
unit64 const GetOwnerGUID() const { return GetUInt64Value(CORPSE_FIELD_OWNER); }
|
||||
|
||||
time_t const& GetGhostTime() const { return m_time; }
|
||||
void ResetGhostTime() { m_time = time(NULL); }
|
||||
|
||||
@@ -34,7 +34,7 @@ class TempSummon : public Creature
|
||||
void SetTempSummonType(TempSummonType type);
|
||||
void SaveToDB(uint32 /*mapid*/, uint8 /*spawnMask*/, uint32 /*phaseMask*/) {}
|
||||
Unit* GetSummoner() const;
|
||||
uint64 const& GetSummonerGUID() { return m_summonerGUID; }
|
||||
unit64 const GetSummonerGUID() { return m_summonerGUID; }
|
||||
TempSummonType const& GetSummonType() { return m_type; }
|
||||
|
||||
const SummonPropertiesEntry * const m_Properties;
|
||||
|
||||
@@ -235,7 +235,7 @@ class Item : public Object
|
||||
|
||||
ItemTemplate const* GetTemplate() const;
|
||||
|
||||
uint64 const& GetOwnerGUID() const { return GetUInt64Value(ITEM_FIELD_OWNER); }
|
||||
unit64 const GetOwnerGUID() const { return GetUInt64Value(ITEM_FIELD_OWNER); }
|
||||
void SetOwnerGUID(uint64 guid) { SetUInt64Value(ITEM_FIELD_OWNER, guid); }
|
||||
Player* GetOwner()const;
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ enum HighGuid
|
||||
#define _GUID_LOPART_2(x) (uint32)(uint64(x) & UI64LIT(0x00000000FFFFFFFF))
|
||||
#define _GUID_LOPART_3(x) (uint32)(uint64(x) & UI64LIT(0x0000000000FFFFFF))
|
||||
|
||||
inline bool IsGuidHaveEnPart(uint64 const& guid)
|
||||
inline bool IsGuidHaveEnPart(unit64 const guid)
|
||||
{
|
||||
switch(GUID_HIPART(guid))
|
||||
{
|
||||
|
||||
@@ -118,7 +118,7 @@ class Vehicle
|
||||
|
||||
Unit* GetBase() const { return _me; }
|
||||
VehicleEntry const* GetVehicleInfo() const { return _vehicleInfo; }
|
||||
uint32 const& GetCreatureEntry() const { return _creatureEntry; }
|
||||
uint32 const GetCreatureEntry() const { return _creatureEntry; }
|
||||
|
||||
bool HasEmptySeat(int8 seatId) const;
|
||||
Unit* GetPassenger(int8 seatId) const;
|
||||
|
||||
@@ -29,7 +29,7 @@ class GuildMgr
|
||||
public:
|
||||
typedef UNORDERED_MAP<uint32, Guild*> GuildContainer;
|
||||
|
||||
Guild* GetGuildByLeader(uint64 const& guid) const;
|
||||
Guild* GetGuildByLeader(unit64 const guid) const;
|
||||
Guild* GetGuildById(uint32 guildId) const;
|
||||
Guild* GetGuildByName(const std::string& guildName) const;
|
||||
std::string GetGuildNameById(uint32 guildId) const;
|
||||
|
||||
@@ -99,7 +99,7 @@ class Aura
|
||||
uint32 GetId() const{ return GetSpellInfo()->Id; }
|
||||
|
||||
uint64 GetCastItemGUID() const { return m_castItemGuid; }
|
||||
uint64 const& GetCasterGUID() const { return m_casterGuid; }
|
||||
unit64 const GetCasterGUID() const { return m_casterGuid; }
|
||||
Unit* GetCaster() const;
|
||||
WorldObject * GetOwner() const { return m_owner; }
|
||||
Unit* GetUnitOwner() const { ASSERT(GetType() == UNIT_AURA_TYPE); return (Unit*)m_owner; }
|
||||
@@ -175,9 +175,9 @@ class Aura
|
||||
// Helpers for targets
|
||||
ApplicationMap const & GetApplicationMap() {return m_applications;}
|
||||
void GetApplicationList(std::list<AuraApplication*> & applicationList) const;
|
||||
const AuraApplication * GetApplicationOfTarget (uint64 const & guid) const { ApplicationMap::const_iterator itr = m_applications.find(guid); if (itr != m_applications.end()) return itr->second; return NULL; }
|
||||
AuraApplication * GetApplicationOfTarget (uint64 const & guid) { ApplicationMap::iterator itr = m_applications.find(guid); if (itr != m_applications.end()) return itr->second; return NULL; }
|
||||
bool IsAppliedOnTarget(uint64 const & guid) const { return m_applications.find(guid) != m_applications.end(); }
|
||||
const AuraApplication * GetApplicationOfTarget (unit64 const guid) const { ApplicationMap::const_iterator itr = m_applications.find(guid); if (itr != m_applications.end()) return itr->second; return NULL; }
|
||||
AuraApplication * GetApplicationOfTarget (unit64 const guid) { ApplicationMap::iterator itr = m_applications.find(guid); if (itr != m_applications.end()) return itr->second; return NULL; }
|
||||
bool IsAppliedOnTarget(unit64 const guid) const { return m_applications.find(guid) != m_applications.end(); }
|
||||
|
||||
void SetNeedClientUpdateForTargets() const;
|
||||
void HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, bool apply, bool onReapply);
|
||||
|
||||
@@ -713,7 +713,7 @@ uint32 AuraScript::GetId() const
|
||||
return m_aura->GetId();
|
||||
}
|
||||
|
||||
uint64 const& AuraScript::GetCasterGUID() const
|
||||
unit64 const AuraScript::GetCasterGUID() const
|
||||
{
|
||||
return m_aura->GetCasterGUID();
|
||||
}
|
||||
|
||||
@@ -585,7 +585,7 @@ class AuraScript : public _SpellScript
|
||||
uint32 GetId() const;
|
||||
|
||||
// returns guid of object which casted the aura (m_originalCaster of the Spell class)
|
||||
uint64 const& GetCasterGUID() const;
|
||||
unit64 const GetCasterGUID() const;
|
||||
// returns unit which casted the aura or NULL if not avalible (caster logged out for example)
|
||||
Unit* GetCaster() const;
|
||||
// returns object on which aura was casted, target for non-area auras, area aura source for area auras
|
||||
|
||||
@@ -1176,7 +1176,7 @@ class npc_ball_of_flame : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void SetGUID(uint64 const& guid, int32 /*type*/)
|
||||
void SetGUID(unit64 const guid, int32 /*type*/)
|
||||
{
|
||||
_chaseGUID = guid;
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void SetGUID(uint64 const& guid, int32 type = 0)
|
||||
void SetGUID(unit64 const guid, int32 type = 0)
|
||||
{
|
||||
if (type == GUID_VAMPIRE)
|
||||
_vampires.insert(guid);
|
||||
|
||||
@@ -548,7 +548,7 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
summon->AI()->DoCast(summon, SPELL_TELEPORT_VISUAL);
|
||||
}
|
||||
|
||||
void SetGUID(uint64 const& guid, int32 id/* = 0*/)
|
||||
void SetGUID(unit64 const guid, int32 id/* = 0*/)
|
||||
{
|
||||
if (id != GUID_CULTIST)
|
||||
return;
|
||||
|
||||
@@ -523,7 +523,7 @@ class npc_ice_tomb : public CreatureScript
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void SetGUID(uint64 const& guid, int32 type/* = 0 */)
|
||||
void SetGUID(unit64 const guid, int32 type/* = 0 */)
|
||||
{
|
||||
if (type == DATA_TRAPPED_PLAYER)
|
||||
{
|
||||
|
||||
@@ -971,7 +971,7 @@ class npc_crok_scourgebane : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void SetGUID(uint64 const& guid, int32 type/* = 0*/)
|
||||
void SetGUID(unit64 const guid, int32 type/* = 0*/)
|
||||
{
|
||||
if (type == ACTION_VRYKUL_DEATH)
|
||||
{
|
||||
|
||||
@@ -157,7 +157,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetGUID(uint64 const& guid, int32 id/* = 0 */)
|
||||
void SetGUID(unit64 const guid, int32 id/* = 0 */)
|
||||
{
|
||||
if (id == DATA_INTENSE_COLD)
|
||||
intenseColdList.push_back(guid);
|
||||
|
||||
@@ -299,7 +299,7 @@ class ByteBuffer
|
||||
_rpos += len;
|
||||
}
|
||||
|
||||
void readPackGUID(uint64 guid)
|
||||
void readPackGUID(uint64& guid)
|
||||
{
|
||||
if(rpos() + 1 > size())
|
||||
throw ByteBufferException(false, _rpos, 1, size());
|
||||
|
||||
Reference in New Issue
Block a user