Core: Minor code cleanup before next commits

--HG--
branch : trunk
This commit is contained in:
Spp
2010-09-10 13:37:33 +02:00
parent 842a79d38c
commit fd14d7195f
5 changed files with 22 additions and 36 deletions
+3 -3
View File
@@ -193,7 +193,7 @@ bool ChatHandler::HandleReloadAllGossipsCommand(const char* args)
HandleReloadNpcGossipCommand("a");
HandleReloadPointsOfInterestCommand("a");
return true;
}
}
bool ChatHandler::HandleReloadAllItemCommand(const char*)
{
@@ -6710,11 +6710,11 @@ bool ChatHandler::HandleInstanceUnbindCommand(const char *args)
diff = atoi(pDiff);
uint16 counter = 0;
int16 MapId = 0;
if (strcmp(pMap, "all"))
if (!(MapId = atoi(pMap)))
return false;
for(uint8 i = 0; i < MAX_DIFFICULTY; ++i)
{
Player::BoundInstancesMap &binds = player->GetBoundInstances(Difficulty(i));
-15
View File
@@ -37,7 +37,6 @@ enum LFGenum
LFG_QUEUEUPDATE_INTERVAL = 15000,
LFG_SPELL_COOLDOWN = 71328,
LFG_SPELL_DESERTER = 71041,
LFG_MAX_KICKS = 3,
};
enum LfgType
@@ -57,20 +56,6 @@ enum LfgProposalState
LFG_PROPOSAL_SUCCESS = 2,
};
enum LfgGroupType
{
LFG_GROUPTYPE_ALL = 0, // Internal use, represents all groups.
LFG_GROUPTYPE_CLASSIC = 1,
LFG_GROUPTYPE_BC_NORMAL = 2,
LFG_GROUPTYPE_BC_HEROIC = 3,
LFG_GROUPTYPE_WTLK_NORMAL = 4,
LFG_GROUPTYPE_WTLK_HEROIC = 5,
LFG_GROUPTYPE_CLASSIC_RAID = 6,
LFG_GROUPTYPE_BC_RAID = 7,
LFG_GROUPTYPE_WTLK_RAID_10 = 8,
LFG_GROUPTYPE_WTLK_RAID_25 = 9,
};
enum LfgLockStatusType
{
LFG_LOCKSTATUS_OK = 0, // Internal use only
+8 -6
View File
@@ -162,13 +162,15 @@ bool Group::LoadGroupFromDB(const uint32 &groupGuid, QueryResult_AutoPtr result,
uint32 diff = fields[13].GetUInt8();
if (diff >= MAX_DUNGEON_DIFFICULTY)
diff = DUNGEON_DIFFICULTY_NORMAL;
m_dungeonDifficulty = Difficulty(diff);
m_dungeonDifficulty = DUNGEON_DIFFICULTY_NORMAL;
else
m_dungeonDifficulty = Difficulty(diff);
uint32 r_diff = fields[14].GetUInt8();
if (r_diff >= MAX_RAID_DIFFICULTY)
r_diff = RAID_DIFFICULTY_10MAN_NORMAL;
m_raidDifficulty = Difficulty(r_diff);
m_raidDifficulty = RAID_DIFFICULTY_10MAN_NORMAL;
else
m_raidDifficulty = Difficulty(r_diff);
if (loadMembers)
{
@@ -340,7 +342,7 @@ bool Group::AddMember(const uint64 &guid, const char* name)
player->SetGroupUpdateFlag(GROUP_UPDATE_FULL);
UpdatePlayerOutOfRange(player);
// quest related GO state dependent from raid memebership
// quest related GO state dependent from raid membership
if (isRaidGroup())
player->UpdateForQuestWorldObjects();
@@ -431,7 +433,7 @@ void Group::ChangeLeader(const uint64 &guid)
SendUpdate();
}
void Group::Disband(bool hideDestroy)
void Group::Disband(bool hideDestroy /* = false */)
{
Player *player;
+7 -8
View File
@@ -23,10 +23,8 @@
#include "GroupReference.h"
#include "GroupRefManager.h"
#include "Battleground.h"
#include "LootMgr.h"
#include "DBCEnums.h"
#include "Unit.h"
#include "Battleground.h"
#include <map>
#include <vector>
@@ -38,6 +36,11 @@
#define GROUP_MAX_LFG_KICKS 3
#define GROUP_LFG_KICK_VOTES_NEEDED 3
class InstanceSave;
class Player;
class Unit;
class WorldSession;
enum RollVote
{
PASS = 0,
@@ -86,8 +89,6 @@ enum GroupType
// 0x10, leave/change group?, I saw this flag when leaving group and after leaving BG while in group
};
class Battleground;
enum GroupUpdateFlags
{
GROUP_UPDATE_FLAG_NONE = 0x00000000, // nothing
@@ -119,8 +120,6 @@ enum GroupUpdateFlags
// 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11,12,13,14,15,16,17,18,19
static const uint8 GroupUpdateLength[GROUP_UPDATE_FLAGS_COUNT] = { 0, 2, 2, 2, 1, 2, 2, 2, 2, 4, 8, 8, 1, 2, 2, 2, 1, 2, 2, 8};
class InstanceSave;
class Roll : public LootValidatorRef
{
public:
@@ -151,7 +150,7 @@ struct InstanceGroupBind
{
InstanceSave *save;
bool perm;
/* permanent InstanceGroupBinds exist iff the leader has a permanent
/* permanent InstanceGroupBinds exist if the leader has a permanent
PlayerInstanceBind for the same instance. */
InstanceGroupBind() : save(NULL), perm(false) {}
};