mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core: Minor code cleanup before next commits
--HG-- branch : trunk
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
--
|
||||
-- Host: localhost Database: characters
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 5.0.45-Debian_1ubuntu3.1-log
|
||||
-- Server version 5.0.45-Debian_1ubuntu3.1-log
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
@@ -1452,7 +1452,7 @@ CREATE TABLE `guild_bank_eventlog` (
|
||||
`DestTabId` tinyint(1) unsigned NOT NULL default '0' COMMENT 'Destination Tab Id',
|
||||
`TimeStamp` bigint(20) unsigned NOT NULL default '0' COMMENT 'Event UNIX time',
|
||||
PRIMARY KEY (`guildid`,`LogGuid`,`TabId`),
|
||||
KEY `guildid_key` (`guildid`),
|
||||
KEY `guildid_key` (`guildid`),
|
||||
INDEX `Idx_PlayerGuid`(`PlayerGuid`),
|
||||
INDEX `Idx_LogGuid`(`LogGuid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
@@ -1481,7 +1481,7 @@ CREATE TABLE `guild_bank_item` (
|
||||
`item_guid` int(11) unsigned NOT NULL default '0',
|
||||
`item_entry` int(11) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`guildid`,`tabid`,`slotid`),
|
||||
KEY `guildid_key` (`guildid`),
|
||||
KEY `guildid_key` (`guildid`),
|
||||
INDEX `Idx_item_guid`(`item_guid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
@@ -1977,7 +1977,7 @@ CREATE TABLE `petition_sign` (
|
||||
`player_account` int(11) unsigned NOT NULL default '0',
|
||||
`type` int(10) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`petitionguid`,`playerguid`),
|
||||
INDEX `Idx_playerguid`(`playerguid`),
|
||||
INDEX `Idx_playerguid`(`playerguid`),
|
||||
INDEX `Idx_ownerguid`(`ownerguid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Guild System';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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) {}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user