Core: Crash fix (TemporarySummon), remove some warnings and some other minor changes

- "const uint64" and "uint64 const" --> uint64
 - Add some info in LFGDungeonEntry
 - Move some definitions from ".h" files and move to ".cpp"
This commit is contained in:
Spp-
2011-08-30 13:46:36 +02:00
parent fcf58e7062
commit aa85553bfd
50 changed files with 455 additions and 500 deletions
+12 -12
View File
@@ -270,7 +270,7 @@ void Group::RemoveAllInvites()
m_invitees.clear();
}
Player* Group::GetInvited(const uint64 guid) const
Player* Group::GetInvited(uint64 guid) const
{
for (InvitesList::const_iterator itr = m_invitees.begin(); itr != m_invitees.end(); ++itr)
{
@@ -387,7 +387,7 @@ bool Group::AddMember(Player* player)
return true;
}
bool Group::RemoveMember(const uint64 guid, const RemoveMethod &method /*= GROUP_REMOVEMETHOD_DEFAULT*/, uint64 kicker /*= 0*/, const char* reason /*= NULL*/)
bool Group::RemoveMember(uint64 guid, const RemoveMethod &method /*= GROUP_REMOVEMETHOD_DEFAULT*/, uint64 kicker /*= 0*/, const char* reason /*= NULL*/)
{
BroadcastGroupUpdate();
@@ -498,7 +498,7 @@ bool Group::RemoveMember(const uint64 guid, const RemoveMethod &method /*= GROUP
}
}
void Group::ChangeLeader(const uint64 guid)
void Group::ChangeLeader(uint64 guid)
{
member_witerator slot = _getMemberWSlot(guid);
@@ -652,7 +652,7 @@ void Group::SendLootStartRoll(uint32 CountDown, uint32 mapid, const Roll &r)
}
}
void Group::SendLootRoll(const uint64 SourceGuid, const uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r)
void Group::SendLootRoll(uint64 SourceGuid, uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r)
{
WorldPacket data(SMSG_LOOT_ROLL, (8+4+8+4+4+4+1+1+1));
data << uint64(SourceGuid); // guid of the item rolled
@@ -676,7 +676,7 @@ void Group::SendLootRoll(const uint64 SourceGuid, const uint64 TargetGuid, uint8
}
}
void Group::SendLootRollWon(const uint64 SourceGuid, const uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r)
void Group::SendLootRollWon(uint64 SourceGuid, uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r)
{
WorldPacket data(SMSG_LOOT_ROLL_WON, (8+4+4+4+4+8+1+1));
data << uint64(SourceGuid); // guid of the item rolled
@@ -949,7 +949,7 @@ void Group::MasterLoot(Loot* /*loot*/, WorldObject* pLootedObject)
}
}
void Group::CountRollVote(const uint64 playerGUID, const uint64 Guid, uint32 NumberOfPlayers, uint8 Choice)
void Group::CountRollVote(uint64 playerGUID, uint64 Guid, uint32 NumberOfPlayers, uint8 Choice)
{
Rolls::iterator rollI = GetRoll(Guid);
if (rollI == RollId.end())
@@ -1295,7 +1295,7 @@ void Group::OfflineReadyCheck()
}
}
bool Group::_setMembersGroup(const uint64 guid, uint8 group)
bool Group::_setMembersGroup(uint64 guid, uint8 group)
{
member_witerator slot = _getMemberWSlot(guid);
if (slot == m_memberSlots.end())
@@ -1322,7 +1322,7 @@ bool Group::SameSubGroup(Player const* member1, Player const* member2) const
}
// Allows setting sub groups both for online or offline members
void Group::ChangeMembersGroup(const uint64 guid, uint8 group)
void Group::ChangeMembersGroup(uint64 guid, uint8 group)
{
// Only raid groups have sub groups
if (!isRaidGroup())
@@ -1767,7 +1767,7 @@ void Group::SetLootMethod(LootMethod method)
m_lootMethod = method;
}
void Group::SetLooterGuid(const uint64 guid)
void Group::SetLooterGuid(uint64 guid)
{
m_looterGuid = guid;
}
@@ -1847,12 +1847,12 @@ ItemQualities Group::GetLootThreshold() const
return m_lootThreshold;
}
bool Group::IsMember(const uint64 guid) const
bool Group::IsMember(uint64 guid) const
{
return _getMemberCSlot(guid) != m_memberSlots.end();
}
bool Group::IsLeader(const uint64 guid) const
bool Group::IsLeader(uint64 guid) const
{
return (GetLeaderGUID() == guid);
}
@@ -1873,7 +1873,7 @@ bool Group::IsAssistant(uint64 guid) const
return mslot->flags & MEMBER_FLAG_ASSISTANT;
}
bool Group::SameSubGroup(uint64 guid1, const uint64 guid2) const
bool Group::SameSubGroup(uint64 guid1, uint64 guid2) const
{
member_citerator mslot2 = _getMemberCSlot(guid2);
if (mslot2 == m_memberSlots.end())
+12 -12
View File
@@ -191,10 +191,10 @@ class Group
void RemoveAllInvites();
bool AddLeaderInvite(Player* player);
bool AddMember(Player* player);
bool RemoveMember(const uint64 guid, const RemoveMethod &method = GROUP_REMOVEMETHOD_DEFAULT, uint64 kicker = 0, const char* reason = NULL);
void ChangeLeader(const uint64 guid);
bool RemoveMember(uint64 guid, const RemoveMethod &method = GROUP_REMOVEMETHOD_DEFAULT, uint64 kicker = 0, const char* reason = NULL);
void ChangeLeader(uint64 guid);
void SetLootMethod(LootMethod method);
void SetLooterGuid(const uint64 guid);
void SetLooterGuid(uint64 guid);
void UpdateLooterGuid(WorldObject* pLootedObject, bool ifneed = false);
void SetLootThreshold(ItemQualities threshold);
void Disband(bool hideDestroy=false);
@@ -217,15 +217,15 @@ class Group
uint32 GetDbStoreId() { return m_dbStoreId; };
// member manipulation methods
bool IsMember(const uint64 guid) const;
bool IsLeader(const uint64 guid) const;
bool IsMember(uint64 guid) const;
bool IsLeader(uint64 guid) const;
uint64 GetMemberGUID(const std::string& name);
bool IsAssistant(uint64 guid) const;
Player* GetInvited(const uint64 guid) const;
Player* GetInvited(uint64 guid) const;
Player* GetInvited(const std::string& name) const;
bool SameSubGroup(uint64 guid1, const uint64 guid2) const;
bool SameSubGroup(uint64 guid1, uint64 guid2) const;
bool SameSubGroup(uint64 guid1, MemberSlot const* slot2) const;
bool SameSubGroup(Player const* member1, Player const* member2) const;
bool HasFreeSlotSubGroup(uint8 subgroup) const;
@@ -241,7 +241,7 @@ class Group
void SetBattlegroundGroup(Battleground *bg);
GroupJoinBattlegroundResult CanJoinBattlegroundQueue(Battleground const* bgOrTemplate, BattlegroundQueueTypeId bgQueueTypeId, uint32 MinPlayerCount, uint32 MaxPlayerCount, bool isRated, uint32 arenaSlot);
void ChangeMembersGroup(const uint64 guid, uint8 group);
void ChangeMembersGroup(uint64 guid, uint8 group);
void ChangeMembersGroup(Player* player, uint8 group);
void SetTargetIcon(uint8 id, uint64 whoGuid, uint64 targetGuid);
void SetGroupMemberFlag(uint64 guid, bool apply, GroupMemberFlags flag);
@@ -272,8 +272,8 @@ class Group
bool isRollLootActive() const;
void SendLootStartRoll(uint32 CountDown, uint32 mapid, const Roll &r);
void SendLootRoll(const uint64 SourceGuid, const uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r);
void SendLootRollWon(const uint64 SourceGuid, const uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r);
void SendLootRoll(uint64 SourceGuid, uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r);
void SendLootRollWon(uint64 SourceGuid, uint64 TargetGuid, uint8 RollNumber, uint8 RollType, const Roll &r);
void SendLootAllPassed(uint32 NumberOfPlayers, const Roll &r);
void SendLooter(Creature *pCreature, Player *pLooter);
void GroupLoot(Loot *loot, WorldObject* pLootedObject);
@@ -281,7 +281,7 @@ class Group
void MasterLoot(Loot *loot, WorldObject* pLootedObject);
Rolls::iterator GetRoll(uint64 Guid);
void CountTheRoll(Rolls::iterator roll, uint32 NumberOfPlayers);
void CountRollVote(const uint64 playerGUID, const uint64 Guid, uint32 NumberOfPlayers, uint8 Choise);
void CountRollVote(uint64 playerGUID, uint64 Guid, uint32 NumberOfPlayers, uint8 Choise);
void EndRoll(Loot *loot);
// related to disenchant rolls
@@ -301,7 +301,7 @@ class Group
void BroadcastGroupUpdate(void);
protected:
bool _setMembersGroup(const uint64 guid, uint8 group);
bool _setMembersGroup(uint64 guid, uint8 group);
void _homebindIfInstance(Player* player);
void _initRaidSubGroupsCounter();