Core: Remove lots warnings:
- All "'xxx' will be initialized after 'yyy' when initialized here" - Some "unused variable" - Some "enumeration value 'xxx' not handled in switch" --HG-- branch : trunk
This commit is contained in:
@@ -317,7 +317,7 @@ class EventMap : private std::map<uint32, uint32>
|
||||
private:
|
||||
uint32 m_time, m_phase;
|
||||
public:
|
||||
explicit EventMap() : m_phase(0), m_time(0) {}
|
||||
explicit EventMap(): m_time(0), m_phase(0) {}
|
||||
|
||||
uint32 GetTimer() const { return m_time; }
|
||||
|
||||
|
||||
@@ -20,17 +20,17 @@ enum ePoints
|
||||
|
||||
npc_escortAI::npc_escortAI(Creature* pCreature) : ScriptedAI(pCreature),
|
||||
m_uiPlayerGUID(0),
|
||||
MaxPlayerDistance(DEFAULT_MAX_PLAYER_DISTANCE),
|
||||
m_uiPlayerCheckTimer(1000),
|
||||
m_uiWPWaitTimer(2500),
|
||||
m_uiPlayerCheckTimer(1000),
|
||||
m_uiEscortState(STATE_ESCORT_NONE),
|
||||
MaxPlayerDistance(DEFAULT_MAX_PLAYER_DISTANCE),
|
||||
m_pQuestForEscort(NULL),
|
||||
m_bIsActiveAttacker(true),
|
||||
m_bIsRunning(false),
|
||||
DespawnAtEnd(true),
|
||||
DespawnAtFar(true),
|
||||
m_pQuestForEscort(NULL),
|
||||
m_bCanInstantRespawn(false),
|
||||
m_bCanReturnToStart(false),
|
||||
DespawnAtEnd(true),
|
||||
DespawnAtFar(true),
|
||||
ScriptWP(false)
|
||||
{}
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@ enum ePoints
|
||||
|
||||
FollowerAI::FollowerAI(Creature* pCreature) : ScriptedAI(pCreature),
|
||||
m_uiLeaderGUID(0),
|
||||
m_pQuestForFollow(NULL),
|
||||
m_uiUpdateFollowTimer(2500),
|
||||
m_uiFollowState(STATE_FOLLOW_NONE)
|
||||
m_uiFollowState(STATE_FOLLOW_NONE),
|
||||
m_pQuestForFollow(NULL)
|
||||
{}
|
||||
|
||||
void FollowerAI::AttackStart(Unit* pWho)
|
||||
|
||||
@@ -341,7 +341,7 @@ class Battleground
|
||||
{
|
||||
}
|
||||
|
||||
virtual void DestroyGate(Player* pl, GameObject* go, uint32 destroyedEvent) {}
|
||||
virtual void DestroyGate(Player* /*pl*/, GameObject* /*go*/, uint32 /*destroyedEvent*/) {}
|
||||
|
||||
/* achievement req. */
|
||||
virtual bool IsAllNodesConrolledByTeam(uint32 /*team*/) const { return false; }
|
||||
@@ -529,7 +529,7 @@ class Battleground
|
||||
virtual void EventPlayerCapturedFlag(Player* /*player*/) {}
|
||||
void EventPlayerLoggedIn(Player* player, uint64 plr_guid);
|
||||
void EventPlayerLoggedOut(Player* player);
|
||||
virtual void EventPlayerDamagedGO(Player* plr, GameObject* go, uint8 hitType, uint32 destroyedEvent) {}
|
||||
virtual void EventPlayerDamagedGO(Player* /*plr*/, GameObject* /*go*/, uint8 /*hitType*/, uint32 /*destroyedEvent*/) {}
|
||||
virtual void EventPlayerUsedGO(Player* /*player*/, GameObject* /*go*/){}
|
||||
|
||||
/* Death related */
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "World.h"
|
||||
|
||||
Channel::Channel(const std::string& name, uint32 channel_id, uint32 Team)
|
||||
: m_name(name), m_announce(true), m_moderate(false), m_channelId(channel_id), m_ownerGUID(0), m_password(""), m_flags(0), m_Team(Team)
|
||||
: m_announce(true), m_moderate(false), m_name(name), m_password(""), m_flags(0), m_channelId(channel_id), m_ownerGUID(0), m_Team(Team)
|
||||
{
|
||||
// set special flags if built-in channel
|
||||
ChatChannelsEntry const* ch = GetChannelEntryFor(channel_id);
|
||||
|
||||
@@ -237,7 +237,7 @@ typedef std::map<uint32, LfgProposalPlayer*> LfgProposalPlayerMap;
|
||||
// Stores all Dungeon Proposal after matching candidates
|
||||
struct LfgProposal
|
||||
{
|
||||
LfgProposal(uint32 dungeon): state(LFG_PROPOSAL_INITIATING), groupLowGuid(0), dungeonId(dungeon), leaderLowGuid(0) {}
|
||||
LfgProposal(uint32 dungeon): dungeonId(dungeon), state(LFG_PROPOSAL_INITIATING), groupLowGuid(0), leaderLowGuid(0) {}
|
||||
|
||||
~LfgProposal()
|
||||
{
|
||||
|
||||
@@ -138,16 +138,14 @@ bool ForcedDespawnDelayEvent::Execute(uint64 /*e_time*/, uint32 /*p_time*/)
|
||||
return true;
|
||||
}
|
||||
|
||||
Creature::Creature() :
|
||||
Unit(),
|
||||
Creature::Creature(): Unit(),
|
||||
lootForPickPocketed(false), lootForBody(false), m_groupLootTimer(0), lootingGroupLowGUID(0),
|
||||
m_lootMoney(0), m_lootRecipient(0),
|
||||
m_deathTimer(0), m_respawnTime(0), m_respawnDelay(300), m_corpseDelay(60), m_respawnradius(0.0f),
|
||||
m_PlayerDamageReq(0), m_lootMoney(0), m_lootRecipient(0), m_deathTimer(0), m_respawnTime(0),
|
||||
m_respawnDelay(300), m_corpseDelay(60), m_respawnradius(0.0f), m_reactState(REACT_AGGRESSIVE),
|
||||
m_defaultMovementType(IDLE_MOTION_TYPE), m_DBTableGuid(0), m_equipmentId(0), m_AlreadyCallAssistance(false),
|
||||
m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false), m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),
|
||||
m_creatureInfo(NULL), m_reactState(REACT_AGGRESSIVE), m_formation(NULL)
|
||||
, m_AlreadySearchedAssistance(false)
|
||||
, m_creatureData(NULL), m_PlayerDamageReq(0)
|
||||
m_AlreadySearchedAssistance(false), m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false),
|
||||
m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL), m_creatureInfo(NULL), m_creatureData(NULL),
|
||||
m_formation(NULL)
|
||||
{
|
||||
m_regenTimer = CREATURE_REGEN_INTERVAL;
|
||||
m_valuesCount = UNIT_END;
|
||||
|
||||
@@ -60,7 +60,7 @@ class CreatureGroup
|
||||
|
||||
public:
|
||||
//Group cannot be created empty
|
||||
explicit CreatureGroup(uint32 id) : m_groupID(id), m_leader(NULL), m_Formed(false) {}
|
||||
explicit CreatureGroup(uint32 id) : m_leader(NULL), m_groupID(id), m_Formed(false) {}
|
||||
~CreatureGroup() { sLog.outDebug("Destroying group"); }
|
||||
|
||||
Creature* getLeader() const { return m_leader; }
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
TempSummon::TempSummon(SummonPropertiesEntry const *properties, Unit *owner) :
|
||||
Creature(), m_type(TEMPSUMMON_MANUAL_DESPAWN), m_timer(0), m_lifetime(0)
|
||||
, m_Properties(properties)
|
||||
Creature(), m_Properties(properties), m_type(TEMPSUMMON_MANUAL_DESPAWN),
|
||||
m_timer(0), m_lifetime(0)
|
||||
{
|
||||
m_summonerGUID = owner ? owner->GetGUID() : 0;
|
||||
m_unitTypeMask |= UNIT_MASK_SUMMON;
|
||||
|
||||
@@ -1215,15 +1215,11 @@ void MovementInfo::OutDebug()
|
||||
}
|
||||
}
|
||||
|
||||
WorldObject::WorldObject()
|
||||
: WorldLocation(), m_InstanceId(0), m_phaseMask(PHASEMASK_NORMAL), m_currMap(NULL)
|
||||
, m_zoneScript(NULL)
|
||||
, m_isActive(false), m_isWorldObject(false)
|
||||
, m_name("")
|
||||
, m_notifyflags(0), m_executed_notifies(0)
|
||||
{
|
||||
m_transport = NULL;
|
||||
}
|
||||
WorldObject::WorldObject(): WorldLocation(),
|
||||
m_isWorldObject(false), m_name(""), m_isActive(false), m_zoneScript(NULL),
|
||||
m_transport(NULL), m_currMap(NULL), m_InstanceId(0),
|
||||
m_phaseMask(PHASEMASK_NORMAL), m_notifyflags(0), m_executed_notifies(0)
|
||||
{}
|
||||
|
||||
void WorldObject::SetWorldObject(bool on)
|
||||
{
|
||||
@@ -1994,6 +1990,8 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
|
||||
pet->SetPower(POWER_MANA, pet->GetMaxPower(POWER_MANA));
|
||||
pet->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, time(NULL));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
map->Add(pet->ToCreature());
|
||||
@@ -2006,6 +2004,8 @@ Pet* Player::SummonPet(uint32 entry, float x, float y, float z, float ang, PetTy
|
||||
pet->SavePetToDB(PET_SAVE_AS_CURRENT);
|
||||
PetSpellInitialize();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (petType == SUMMON_PET)
|
||||
@@ -2538,4 +2538,4 @@ uint64 WorldObject::GetTransGUID() const
|
||||
if (GetTransport())
|
||||
return GetTransport()->GetGUID();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,9 +43,9 @@ char const* petTypeSuffix[MAX_PET_TYPE] =
|
||||
#define PET_XP_FACTOR 0.05f
|
||||
|
||||
Pet::Pet(Player *owner, PetType type) : Guardian(NULL, owner),
|
||||
m_petType(type), m_removed(false), m_happinessTimer(7500), m_duration(0),
|
||||
m_resetTalentsCost(0), m_resetTalentsTime(0), m_usedTalentCount(0), m_auraRaidUpdateMask(0), m_loading(false),
|
||||
m_declinedname(NULL), m_owner(owner)
|
||||
m_resetTalentsCost(0), m_resetTalentsTime(0), m_usedTalentCount(0),
|
||||
m_removed(false), m_owner(owner), m_happinessTimer(7500), m_petType(type),
|
||||
m_duration(0), m_auraRaidUpdateMask(0), m_loading(false), m_declinedname(NULL)
|
||||
{
|
||||
m_unitTypeMask |= UNIT_MASK_PET;
|
||||
if (type == HUNTER_PET)
|
||||
|
||||
@@ -179,7 +179,7 @@ void MapManager::LoadTransportNPCs()
|
||||
sLog.outString(">> Loaded %u transport npcs", count);
|
||||
}
|
||||
|
||||
Transport::Transport(uint32 period, uint32 script) : m_period(period), ScriptId(script), GameObject()
|
||||
Transport::Transport(uint32 period, uint32 script) : GameObject(), m_period(period), ScriptId(script)
|
||||
{
|
||||
m_updateFlag = (UPDATEFLAG_TRANSPORT | UPDATEFLAG_HIGHGUID | UPDATEFLAG_HAS_POSITION | UPDATEFLAG_ROTATION);
|
||||
}
|
||||
|
||||
@@ -93,12 +93,12 @@ static bool isAlwaysTriggeredAura[TOTAL_AURAS];
|
||||
// Prepare lists
|
||||
static bool procPrepared = InitTriggerAuraData();
|
||||
|
||||
Unit::Unit()
|
||||
: WorldObject(), i_motionMaster(this), m_ThreatManager(this), m_HostileRefManager(this)
|
||||
, IsAIEnabled(false), NeedChangeAI(false)
|
||||
, i_AI(NULL), i_disabledAI(NULL), m_removedAurasCount(0), m_vehicle(NULL)
|
||||
, m_ControlledByPlayer(false), m_procDeep(0), m_unitTypeMask(UNIT_MASK_NONE), m_vehicleKit(NULL)
|
||||
, m_movedPlayer(NULL)
|
||||
Unit::Unit(): WorldObject(),
|
||||
m_movedPlayer(NULL), IsAIEnabled(false), NeedChangeAI(false),
|
||||
m_ControlledByPlayer(false), i_AI(NULL), i_disabledAI(NULL), m_procDeep(0),
|
||||
m_removedAurasCount(0), i_motionMaster(this), m_ThreatManager(this),
|
||||
m_vehicle(NULL), m_vehicleKit(NULL), m_unitTypeMask(UNIT_MASK_NONE),
|
||||
m_HostileRefManager(this)
|
||||
{
|
||||
m_objectType |= TYPEMASK_UNIT;
|
||||
m_objectTypeId = TYPEID_UNIT;
|
||||
|
||||
@@ -805,7 +805,7 @@ enum MeleeHitOutcome
|
||||
struct CleanDamage
|
||||
{
|
||||
CleanDamage(uint32 mitigated, uint32 absorbed, WeaponAttackType _attackType, MeleeHitOutcome _hitOutCome) :
|
||||
mitigated_damage(mitigated), absorbed_damage(absorbed), attackType(_attackType), hitOutCome(_hitOutCome) {}
|
||||
absorbed_damage(absorbed), mitigated_damage(mitigated), attackType(_attackType), hitOutCome(_hitOutCome) {}
|
||||
|
||||
uint32 absorbed_damage;
|
||||
uint32 mitigated_damage;
|
||||
|
||||
@@ -55,7 +55,7 @@ struct GameEventQuestToEventConditionNum
|
||||
|
||||
struct GameEventData
|
||||
{
|
||||
GameEventData() : start(1),end(0),nextstart(0),occurence(0),length(0),state(GAMEEVENT_NORMAL), holiday_id(HOLIDAY_NONE) {}
|
||||
GameEventData() : start(1), end(0), nextstart(0), occurence(0), length(0), holiday_id(HOLIDAY_NONE), state(GAMEEVENT_NORMAL) {}
|
||||
time_t start; // occurs after this time
|
||||
time_t end; // occurs before this time
|
||||
time_t nextstart; // after this time the follow-up events count this phase completed
|
||||
|
||||
@@ -35,11 +35,11 @@ class GridInfo
|
||||
{
|
||||
public:
|
||||
GridInfo()
|
||||
: i_timer(0), i_unloadActiveLockCount(0), i_unloadExplicitLock(false), i_unloadReferenceLock(false),
|
||||
vis_Update(0, irand(0,DEFAULT_VISIBILITY_NOTIFY_PERIOD)) {}
|
||||
: i_timer(0), vis_Update(0, irand(0,DEFAULT_VISIBILITY_NOTIFY_PERIOD)),
|
||||
i_unloadActiveLockCount(0), i_unloadExplicitLock(false), i_unloadReferenceLock(false) {}
|
||||
GridInfo(time_t expiry, bool unload = true )
|
||||
: i_timer(expiry), i_unloadActiveLockCount(0), i_unloadExplicitLock(!unload), i_unloadReferenceLock(false),
|
||||
vis_Update(0, irand(0,DEFAULT_VISIBILITY_NOTIFY_PERIOD)) {}
|
||||
: i_timer(expiry), vis_Update(0, irand(0,DEFAULT_VISIBILITY_NOTIFY_PERIOD)),
|
||||
i_unloadActiveLockCount(0), i_unloadExplicitLock(!unload), i_unloadReferenceLock(false) {}
|
||||
const TimeTracker& getTimeTracker() const { return i_timer; }
|
||||
bool getUnloadLock() const { return i_unloadActiveLockCount || i_unloadExplicitLock || i_unloadReferenceLock; }
|
||||
void setUnloadExplicitLock( bool on ) { i_unloadExplicitLock = on; }
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace Trinity
|
||||
CellPair &p;
|
||||
const float i_radius;
|
||||
DelayedUnitRelocation(Cell &c, CellPair &pair, Map &map, float radius) :
|
||||
cell(c), p(pair), i_map(map), i_radius(radius) {}
|
||||
i_map(map), cell(c), p(pair), i_radius(radius) {}
|
||||
template<class T> void Visit(GridRefManager<T> &) {}
|
||||
void Visit(CreatureMapType &);
|
||||
void Visit(PlayerMapType &);
|
||||
@@ -129,7 +129,7 @@ namespace Trinity
|
||||
uint32 team;
|
||||
Player const* skipped_receiver;
|
||||
MessageDistDeliverer(WorldObject *src, WorldPacket *msg, float dist, bool own_team_only = false, Player const* skipped = NULL)
|
||||
: i_source(src), i_message(msg), i_distSq(dist * dist), i_phaseMask(src->GetPhaseMask())
|
||||
: i_source(src), i_message(msg), i_phaseMask(src->GetPhaseMask()), i_distSq(dist * dist)
|
||||
, team((own_team_only && src->GetTypeId() == TYPEID_PLAYER) ? ((Player*)src)->GetTeam() : 0)
|
||||
, skipped_receiver(skipped)
|
||||
{
|
||||
@@ -1207,7 +1207,7 @@ namespace Trinity
|
||||
x(_x), y(_y), z(_z), range(_range), entry(_entry) {}
|
||||
bool operator() (GameObject* go)
|
||||
{
|
||||
if (!entry || go->GetGOInfo() && go->GetGOInfo()->id == entry)
|
||||
if (!entry || (go->GetGOInfo() && go->GetGOInfo()->id == entry))
|
||||
return go->IsInRange(x, y, z, range);
|
||||
else return false;
|
||||
}
|
||||
|
||||
@@ -215,13 +215,12 @@ void Map::DeleteStateMachine()
|
||||
delete si_GridStates[GRID_STATE_REMOVAL];
|
||||
}
|
||||
|
||||
Map::Map(uint32 id, time_t expiry, uint32 InstanceId, uint8 SpawnMode, Map* _parent)
|
||||
: i_mapEntry (sMapStore.LookupEntry(id)), i_spawnMode(SpawnMode), i_InstanceId(InstanceId), m_unloadTimer(0),
|
||||
m_activeNonPlayersIter(m_activeNonPlayers.end()),
|
||||
i_gridExpiry(expiry), m_parentMap(_parent ? _parent : this),
|
||||
m_VisibleDistance(DEFAULT_VISIBILITY_DISTANCE),
|
||||
m_VisibilityNotifyPeriod(DEFAULT_VISIBILITY_NOTIFY_PERIOD),
|
||||
i_scriptLock(false)
|
||||
Map::Map(uint32 id, time_t expiry, uint32 InstanceId, uint8 SpawnMode, Map* _parent):
|
||||
i_mapEntry (sMapStore.LookupEntry(id)), i_spawnMode(SpawnMode), i_InstanceId(InstanceId),
|
||||
m_unloadTimer(0), m_VisibleDistance(DEFAULT_VISIBILITY_DISTANCE),
|
||||
m_VisibilityNotifyPeriod(DEFAULT_VISIBILITY_NOTIFY_PERIOD),
|
||||
m_activeNonPlayersIter(m_activeNonPlayers.end()), i_gridExpiry(expiry),
|
||||
m_parentMap(_parent ? _parent : this), i_scriptLock(false)
|
||||
{
|
||||
for (unsigned int idx=0; idx < MAX_NUMBER_OF_GRIDS; ++idx)
|
||||
{
|
||||
|
||||
@@ -61,8 +61,8 @@ class MapUpdateRequest : public ACE_Method_Request
|
||||
}
|
||||
};
|
||||
|
||||
MapUpdater::MapUpdater()
|
||||
: m_mutex(), m_condition(m_mutex), m_executor(), pending_requests(0)
|
||||
MapUpdater::MapUpdater():
|
||||
m_executor(), m_mutex(), m_condition(m_mutex), pending_requests(0)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ class MapUpdater
|
||||
private:
|
||||
|
||||
DelayExecutor m_executor;
|
||||
ACE_Condition_Thread_Mutex m_condition;
|
||||
ACE_Thread_Mutex m_mutex;
|
||||
ACE_Condition_Thread_Mutex m_condition;
|
||||
size_t pending_requests;
|
||||
|
||||
void update_finished();
|
||||
|
||||
@@ -96,7 +96,7 @@ class MotionMaster //: private std::stack<MovementGenerator *>
|
||||
void InitTop();
|
||||
public:
|
||||
|
||||
explicit MotionMaster(Unit *unit) : i_owner(unit), m_expList(NULL), m_cleanFlag(MMCF_NONE), i_top(-1)
|
||||
explicit MotionMaster(Unit *unit) : i_top(-1), i_owner(unit), m_expList(NULL), m_cleanFlag(MMCF_NONE)
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_MOTION_SLOT; ++i)
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ class WaypointMovementGenerator
|
||||
{
|
||||
public:
|
||||
WaypointMovementGenerator(uint32 _path_id = 0, bool _repeating = true) :
|
||||
i_nextMoveTime(0), path_id(_path_id), repeating(_repeating), StopedByPlayer(false), node(NULL) {}
|
||||
node(NULL), path_id(_path_id), i_nextMoveTime(0), repeating(_repeating), StopedByPlayer(false) {}
|
||||
|
||||
void Initialize(T &);
|
||||
void Finalize(T &);
|
||||
@@ -105,7 +105,7 @@ public PathMovementBase<Player,TaxiPathNodeList const*>
|
||||
i_currentNode = startNode;
|
||||
}
|
||||
void Initialize(Player &);
|
||||
void Reset(Player &u){};
|
||||
void Reset(Player & /*u*/){};
|
||||
void Finalize(Player &);
|
||||
bool Update(Player &, const uint32 &);
|
||||
MovementGeneratorType GetMovementGeneratorType() { return FLIGHT_MOTION_TYPE; }
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "CellImpl.h"
|
||||
|
||||
OPvPCapturePoint::OPvPCapturePoint(OutdoorPvP * pvp)
|
||||
: m_PvP(pvp), m_value(0), m_maxValue(0), m_team(TEAM_NEUTRAL),
|
||||
m_State(OBJECTIVESTATE_NEUTRAL), m_OldState(OBJECTIVESTATE_NEUTRAL), m_capturePointGUID(0), m_neutralValuePct(0),
|
||||
m_maxSpeed(0), m_capturePoint(NULL)
|
||||
OPvPCapturePoint::OPvPCapturePoint(OutdoorPvP * pvp):
|
||||
m_capturePointGUID(0), m_capturePoint(NULL), m_maxValue(0), m_maxSpeed(0),
|
||||
m_value(0), m_team(TEAM_NEUTRAL), m_OldState(OBJECTIVESTATE_NEUTRAL),
|
||||
m_State(OBJECTIVESTATE_NEUTRAL), m_neutralValuePct(0), m_PvP(pvp)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -223,23 +223,23 @@ class ServerScript : public ScriptObject
|
||||
virtual void OnNetworkStop() { }
|
||||
|
||||
// Called when a remote socket establishes a connection to the server. Do not store the socket object.
|
||||
virtual void OnSocketOpen(WorldSocket* socket) { }
|
||||
virtual void OnSocketOpen(WorldSocket* /*socket*/) { }
|
||||
|
||||
// Called when a socket is closed. Do not store the socket object, and do not rely on the connection
|
||||
// being open; it is not.
|
||||
virtual void OnSocketClose(WorldSocket* socket, bool wasNew) { }
|
||||
virtual void OnSocketClose(WorldSocket* /*socket*/, bool /*wasNew*/) { }
|
||||
|
||||
// Called when a packet is sent to a client. The packet object is a copy of the original packet, so reading
|
||||
// and modifying it is safe.
|
||||
virtual void OnPacketSend(WorldSocket* socket, WorldPacket& packet) { }
|
||||
virtual void OnPacketSend(WorldSocket* /*socket*/, WorldPacket& /*packet*/) { }
|
||||
|
||||
// Called when a (valid) packet is received by a client. The packet object is a copy of the original packet, so
|
||||
// reading and modifying it is safe.
|
||||
virtual void OnPacketReceive(WorldSocket* socket, WorldPacket& packet) { }
|
||||
virtual void OnPacketReceive(WorldSocket* /*socket*/, WorldPacket& /*packet*/) { }
|
||||
|
||||
// Called when an invalid (unknown opcode) packet is received by a client. The packet is a reference to the orignal
|
||||
// packet; not a copy. This allows you to actually handle unknown packets (for whatever purpose).
|
||||
virtual void OnUnknownPacketReceive(WorldSocket* socket, WorldPacket& packet) { }
|
||||
virtual void OnUnknownPacketReceive(WorldSocket* /*socket*/, WorldPacket& /*packet*/) { }
|
||||
};
|
||||
|
||||
class WorldScript : public ScriptObject, public UpdatableScript<void>
|
||||
@@ -251,22 +251,22 @@ class WorldScript : public ScriptObject, public UpdatableScript<void>
|
||||
public:
|
||||
|
||||
// Called when the open/closed state of the world changes.
|
||||
virtual void OnOpenStateChange(bool open) { }
|
||||
virtual void OnOpenStateChange(bool /*open*/) { }
|
||||
|
||||
// Called after the world configuration is (re)loaded.
|
||||
virtual void OnConfigLoad(bool reload) { }
|
||||
virtual void OnConfigLoad(bool /*reload*/) { }
|
||||
|
||||
// Called before the message of the day is changed.
|
||||
virtual void OnMotdChange(std::string& newMotd) { }
|
||||
virtual void OnMotdChange(std::string& /*newMotd*/) { }
|
||||
|
||||
// Called when a world shutdown is initiated.
|
||||
virtual void OnShutdownInitiate(ShutdownExitCode code, ShutdownMask mask) { }
|
||||
virtual void OnShutdownInitiate(ShutdownExitCode /*code*/, ShutdownMask /*mask*/) { }
|
||||
|
||||
// Called when a world shutdown is cancelled.
|
||||
virtual void OnShutdownCancel() { }
|
||||
|
||||
// Called on every world tick (don't execute too heavy code here).
|
||||
virtual void OnUpdate(void* null, uint32 diff) { }
|
||||
virtual void OnUpdate(void* /*null*/, uint32 /*diff*/) { }
|
||||
|
||||
// Called when the world is started.
|
||||
virtual void OnStartup() { }
|
||||
@@ -284,28 +284,28 @@ class FormulaScript : public ScriptObject
|
||||
public:
|
||||
|
||||
// Called after calculating honor.
|
||||
virtual void OnHonorCalculation(float& honor, uint8 level, uint32 count) { }
|
||||
virtual void OnHonorCalculation(float& /*honor*/, uint8 /*level*/, uint32 /*count*/) { }
|
||||
|
||||
// Called after calculating honor.
|
||||
virtual void OnHonorCalculation(uint32& honor, uint8 level, uint32 count) { }
|
||||
virtual void OnHonorCalculation(uint32& /*honor*/, uint8 /*level*/, uint32 /*count*/) { }
|
||||
|
||||
// Called after gray level calculation.
|
||||
virtual void OnGrayLevelCalculation(uint8& grayLevel, uint8 playerLevel) { }
|
||||
virtual void OnGrayLevelCalculation(uint8& /*grayLevel*/, uint8 /*playerLevel*/) { }
|
||||
|
||||
// Called after calculating experience color.
|
||||
virtual void OnColorCodeCalculation(XPColorChar& color, uint8 playerLevel, uint8 mobLevel) { }
|
||||
virtual void OnColorCodeCalculation(XPColorChar& /*color*/, uint8 /*playerLevel*/, uint8 /*mobLevel*/) { }
|
||||
|
||||
// Called after calculating zero difference.
|
||||
virtual void OnZeroDifferenceCalculation(uint8& diff, uint8 playerLevel) { }
|
||||
virtual void OnZeroDifferenceCalculation(uint8& /*diff*/, uint8 /*playerLevel*/) { }
|
||||
|
||||
// Called after calculating base experience gain.
|
||||
virtual void OnBaseGainCalculation(uint32& gain, uint8 playerLevel, uint8 mobLevel, ContentLevels content) { }
|
||||
virtual void OnBaseGainCalculation(uint32& /*gain*/, uint8 /*playerLevel*/, uint8 /*mobLevel*/, ContentLevels /*content*/) { }
|
||||
|
||||
// Called after calculating experience gain.
|
||||
virtual void OnGainCalculation(uint32& gain, Player* player, Unit* unit) { }
|
||||
virtual void OnGainCalculation(uint32& /*gain*/, Player* /*player*/, Unit* /*unit*/) { }
|
||||
|
||||
// Called when calculating the experience rate for group experience.
|
||||
virtual void OnGroupRateCalculation(float& rate, uint32 count, bool isRaid) { }
|
||||
virtual void OnGroupRateCalculation(float& /*rate*/, uint32 /*count*/, bool /*isRaid*/) { }
|
||||
};
|
||||
|
||||
template<class TMap> class MapScript : public UpdatableScript<TMap>
|
||||
@@ -327,25 +327,25 @@ template<class TMap> class MapScript : public UpdatableScript<TMap>
|
||||
MapEntry const* GetEntry() { return _mapEntry; }
|
||||
|
||||
// Called when the map is created.
|
||||
virtual void OnCreate(TMap* map) { }
|
||||
virtual void OnCreate(TMap* /*map*/) { }
|
||||
|
||||
// Called just before the map is destroyed.
|
||||
virtual void OnDestroy(TMap* map) { }
|
||||
virtual void OnDestroy(TMap* /*map*/) { }
|
||||
|
||||
// Called when a grid map is loaded.
|
||||
virtual void OnLoadGridMap(TMap* map, GridMap* gmap, uint32 gx, uint32 gy) { }
|
||||
virtual void OnLoadGridMap(TMap* /*map*/, GridMap* /*gmap*/, uint32 /*gx*/, uint32 /*gy*/) { }
|
||||
|
||||
// Called when a grid map is unloaded.
|
||||
virtual void OnUnloadGridMap(TMap* map, GridMap* gmap, uint32 gx, uint32 gy) { }
|
||||
virtual void OnUnloadGridMap(TMap* /*map*/, GridMap* /*gmap*/, uint32 /*gx*/, uint32 /*gy*/) { }
|
||||
|
||||
// Called when a player enters the map.
|
||||
virtual void OnPlayerEnter(TMap* map, Player* player) { }
|
||||
virtual void OnPlayerEnter(TMap* /*map*/, Player* /*player*/) { }
|
||||
|
||||
// Called when a player leaves the map.
|
||||
virtual void OnPlayerLeave(TMap* map, Player* player) { }
|
||||
virtual void OnPlayerLeave(TMap* /*map*/, Player* /*player*/) { }
|
||||
|
||||
// Called on every map update tick.
|
||||
virtual void OnUpdate(TMap* map, uint32 diff) { }
|
||||
virtual void OnUpdate(TMap* /*map*/, uint32 /*diff*/) { }
|
||||
};
|
||||
|
||||
class WorldMapScript : public ScriptObject, public MapScript<Map>
|
||||
@@ -366,7 +366,7 @@ class InstanceMapScript : public ScriptObject, public MapScript<InstanceMap>
|
||||
bool IsDatabaseBound() const { return true; }
|
||||
|
||||
// Gets an InstanceScript object for this instance.
|
||||
virtual InstanceScript* GetInstanceScript(InstanceMap* map) const { return NULL; }
|
||||
virtual InstanceScript* GetInstanceScript(InstanceMap* /*map*/) const { return NULL; }
|
||||
};
|
||||
|
||||
class BattlegroundMapScript : public ScriptObject, public MapScript<BattlegroundMap>
|
||||
@@ -387,16 +387,16 @@ class ItemScript : public ScriptObject
|
||||
bool IsDatabaseBound() const { return true; }
|
||||
|
||||
// Called when a dummy spell effect is triggered on the item.
|
||||
virtual bool OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex, Item* target) { return false; }
|
||||
virtual bool OnDummyEffect(Unit* /*caster*/, uint32 /*spellId*/, SpellEffIndex /*effIndex*/, Item* /*target*/) { return false; }
|
||||
|
||||
// Called when a player accepts a quest from the item.
|
||||
virtual bool OnQuestAccept(Player* player, Item* item, Quest const* quest) { return false; }
|
||||
virtual bool OnQuestAccept(Player* /*player*/, Item* /*item*/, Quest const* /*quest*/) { return false; }
|
||||
|
||||
// Called when a player uses the item.
|
||||
virtual bool OnUse(Player* player, Item* item, SpellCastTargets const& targets) { return false; }
|
||||
virtual bool OnUse(Player* /*player*/, Item* /*item*/, SpellCastTargets const& /*targets*/) { return false; }
|
||||
|
||||
// Called when the item expires (is destroyed).
|
||||
virtual bool OnExpire(Player* player, ItemPrototype const* proto) { return false; }
|
||||
virtual bool OnExpire(Player* /*player*/, ItemPrototype const* /*proto*/) { return false; }
|
||||
};
|
||||
|
||||
class CreatureScript : public ScriptObject, public UpdatableScript<Creature>
|
||||
@@ -410,34 +410,34 @@ class CreatureScript : public ScriptObject, public UpdatableScript<Creature>
|
||||
bool IsDatabaseBound() const { return true; }
|
||||
|
||||
// Called when a dummy spell effect is triggered on the creature.
|
||||
virtual bool OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex, Creature* target) { return false; }
|
||||
virtual bool OnDummyEffect(Unit* /*caster*/, uint32 /*spellId*/, SpellEffIndex /*effIndex*/, Creature* /*target*/) { return false; }
|
||||
|
||||
// Called when a player opens a gossip dialog with the creature.
|
||||
virtual bool OnGossipHello(Player* player, Creature* creature) { return false; }
|
||||
virtual bool OnGossipHello(Player* /*player*/, Creature* /*creature*/) { return false; }
|
||||
|
||||
// Called when a player selects a gossip item in the creature's gossip menu.
|
||||
virtual bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action) { return false; }
|
||||
virtual bool OnGossipSelect(Player* /*player*/, Creature* /*creature*/, uint32 /*sender*/, uint32 /*action*/) { return false; }
|
||||
|
||||
// Called when a player selects a gossip with a code in the creature's gossip menu.
|
||||
virtual bool OnGossipSelectCode(Player* player, Creature* creature, uint32 sender, uint32 action, const char* code) { return false; }
|
||||
virtual bool OnGossipSelectCode(Player* /*player*/, Creature* /*creature*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { return false; }
|
||||
|
||||
// Called when a player accepts a quest from the creature.
|
||||
virtual bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) { return false; }
|
||||
virtual bool OnQuestAccept(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/) { return false; }
|
||||
|
||||
// Called when a player selects a quest in the creature's quest menu.
|
||||
virtual bool OnQuestSelect(Player* player, Creature* creature, Quest const* quest) { return false; }
|
||||
virtual bool OnQuestSelect(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/) { return false; }
|
||||
|
||||
// Called when a player completes a quest with the creature.
|
||||
virtual bool OnQuestComplete(Player* player, Creature* creature, Quest const* quest) { return false; }
|
||||
virtual bool OnQuestComplete(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/) { return false; }
|
||||
|
||||
// Called when a player selects a quest reward.
|
||||
virtual bool OnQuestReward(Player* player, Creature* creature, Quest const* quest, uint32 opt) { return false; }
|
||||
virtual bool OnQuestReward(Player* /*player*/, Creature* /*creature*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; }
|
||||
|
||||
// Called when the dialog status between a player and the creature is requested.
|
||||
virtual uint32 GetDialogStatus(Player* player, Creature* creature) { return 100; }
|
||||
virtual uint32 GetDialogStatus(Player* /*player*/, Creature* /*creature*/) { return 100; }
|
||||
|
||||
// Called when a CreatureAI object is needed for the creature.
|
||||
virtual CreatureAI* GetAI(Creature* creature) const { return NULL; }
|
||||
virtual CreatureAI* GetAI(Creature* /*creature*/) const { return NULL; }
|
||||
};
|
||||
|
||||
class GameObjectScript : public ScriptObject, public UpdatableScript<GameObject>
|
||||
@@ -451,28 +451,28 @@ class GameObjectScript : public ScriptObject, public UpdatableScript<GameObject>
|
||||
bool IsDatabaseBound() const { return true; }
|
||||
|
||||
// Called when a dummy spell effect is triggered on the gameobject.
|
||||
virtual bool OnDummyEffect(Unit* caster, uint32 spellId, SpellEffIndex effIndex, GameObject* target) { return false; }
|
||||
virtual bool OnDummyEffect(Unit* /*caster*/, uint32 /*spellId*/, SpellEffIndex /*effIndex*/, GameObject* /*target*/) { return false; }
|
||||
|
||||
// Called when a player opens a gossip dialog with the gameobject.
|
||||
virtual bool OnGossipHello(Player* player, GameObject* go) { return false; }
|
||||
virtual bool OnGossipHello(Player* /*player*/, GameObject* /*go*/) { return false; }
|
||||
|
||||
// Called when a player selects a gossip item in the gameobject's gossip menu.
|
||||
virtual bool OnGossipSelect(Player* player, GameObject* go, uint32 sender, uint32 action) { return false; }
|
||||
virtual bool OnGossipSelect(Player* /*player*/, GameObject* /*go*/, uint32 /*sender*/, uint32 /*action*/) { return false; }
|
||||
|
||||
// Called when a player selects a gossip with a code in the gameobject's gossip menu.
|
||||
virtual bool OnGossipSelectCode(Player* player, GameObject* go, uint32 sender, uint32 action, const char* code) { return false; }
|
||||
virtual bool OnGossipSelectCode(Player* /*player*/, GameObject* /*go*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { return false; }
|
||||
|
||||
// Called when a player accepts a quest from the gameobject.
|
||||
virtual bool OnQuestAccept(Player* player, GameObject* go, Quest const* quest) { return false; }
|
||||
virtual bool OnQuestAccept(Player* /*player*/, GameObject* /*go*/, Quest const* /*quest*/) { return false; }
|
||||
|
||||
// Called when a player selects a quest reward.
|
||||
virtual bool OnQuestReward(Player* player, GameObject* go, Quest const* quest, uint32 opt) { return false; }
|
||||
virtual bool OnQuestReward(Player* /*player*/, GameObject* /*go*/, Quest const* /*quest*/, uint32 /*opt*/) { return false; }
|
||||
|
||||
// Called when the dialog status between a player and the gameobject is requested.
|
||||
virtual uint32 GetDialogStatus(Player* player, GameObject* go) { return 100; }
|
||||
virtual uint32 GetDialogStatus(Player* /*player*/, GameObject* /*go*/) { return 100; }
|
||||
|
||||
// Called when the gameobject is destroyed (destructible buildings only).
|
||||
virtual void OnDestroyed(Player* player, GameObject* go, uint32 eventId) { }
|
||||
virtual void OnDestroyed(Player* /*player*/, GameObject* /*go*/, uint32 /*eventId*/) { }
|
||||
};
|
||||
|
||||
class AreaTriggerScript : public ScriptObject
|
||||
@@ -486,7 +486,7 @@ class AreaTriggerScript : public ScriptObject
|
||||
bool IsDatabaseBound() const { return true; }
|
||||
|
||||
// Called when the area trigger is activated by a player.
|
||||
virtual bool OnTrigger(Player* player, AreaTriggerEntry const* trigger) { return false; }
|
||||
virtual bool OnTrigger(Player* /*player*/, AreaTriggerEntry const* /*trigger*/) { return false; }
|
||||
};
|
||||
|
||||
class BattlegroundScript : public ScriptObject
|
||||
@@ -540,7 +540,7 @@ class WeatherScript : public ScriptObject, public UpdatableScript<Weather>
|
||||
bool IsDatabaseBound() const { return true; }
|
||||
|
||||
// Called when the weather changes in the zone this script is associated with.
|
||||
virtual void OnChange(Weather* weather, WeatherState state, float grade) { }
|
||||
virtual void OnChange(Weather* /*weather*/, WeatherState /*state*/, float /*grade*/) { }
|
||||
};
|
||||
|
||||
class AuctionHouseScript : public ScriptObject
|
||||
@@ -552,16 +552,16 @@ class AuctionHouseScript : public ScriptObject
|
||||
public:
|
||||
|
||||
// Called when an auction is added to an auction house.
|
||||
virtual void OnAuctionAdd(AuctionHouseObject* ah, AuctionEntry* entry) { }
|
||||
virtual void OnAuctionAdd(AuctionHouseObject* /*ah*/, AuctionEntry* /*entry*/) { }
|
||||
|
||||
// Called when an auction is removed from an auction house.
|
||||
virtual void OnAuctionRemove(AuctionHouseObject* ah, AuctionEntry* entry) { }
|
||||
virtual void OnAuctionRemove(AuctionHouseObject* /*ah*/, AuctionEntry* /*entry*/) { }
|
||||
|
||||
// Called when an auction was succesfully completed.
|
||||
virtual void OnAuctionSuccessful(AuctionHouseObject* ah, AuctionEntry* entry) { }
|
||||
virtual void OnAuctionSuccessful(AuctionHouseObject* /*ah*/, AuctionEntry* /*entry*/) { }
|
||||
|
||||
// Called when an auction expires.
|
||||
virtual void OnAuctionExpire(AuctionHouseObject* ah, AuctionEntry* entry) { }
|
||||
virtual void OnAuctionExpire(AuctionHouseObject* /*ah*/, AuctionEntry* /*entry*/) { }
|
||||
};
|
||||
|
||||
class ConditionScript : public ScriptObject
|
||||
@@ -575,7 +575,7 @@ class ConditionScript : public ScriptObject
|
||||
bool IsDatabaseBound() const { return true; }
|
||||
|
||||
// Called when a single condition is checked for a player.
|
||||
virtual bool OnConditionCheck(Condition* condition, Player* player, Unit* targetOverride) { return true; }
|
||||
virtual bool OnConditionCheck(Condition* /*condition*/, Player* /*player*/, Unit* /*targetOverride*/) { return true; }
|
||||
};
|
||||
|
||||
class VehicleScript : public ScriptObject
|
||||
@@ -587,25 +587,25 @@ class VehicleScript : public ScriptObject
|
||||
public:
|
||||
|
||||
// Called after a vehicle is installed.
|
||||
virtual void OnInstall(Vehicle* veh) { }
|
||||
virtual void OnInstall(Vehicle* /*veh*/) { }
|
||||
|
||||
// Called after a vehicle is uninstalled.
|
||||
virtual void OnUninstall(Vehicle* veh) { }
|
||||
virtual void OnUninstall(Vehicle* /*veh*/) { }
|
||||
|
||||
// Called after a vehicle dies.
|
||||
virtual void OnDie(Vehicle* veh) { }
|
||||
virtual void OnDie(Vehicle* /*veh*/) { }
|
||||
|
||||
// Called when a vehicle resets.
|
||||
virtual void OnReset(Vehicle* veh) { }
|
||||
virtual void OnReset(Vehicle* /*veh*/) { }
|
||||
|
||||
// Called after an accessory is installed in a vehicle.
|
||||
virtual void OnInstallAccessory(Vehicle* veh, Creature* accessory) { }
|
||||
virtual void OnInstallAccessory(Vehicle* /*veh*/, Creature* /*accessory*/) { }
|
||||
|
||||
// Called after a passenger is added to a vehicle.
|
||||
virtual void OnAddPassenger(Vehicle* veh, Unit* passenger, int8 seatId) { }
|
||||
virtual void OnAddPassenger(Vehicle* /*veh*/, Unit* /*passenger*/, int8 /*seatId*/) { }
|
||||
|
||||
// Called after a passenger is removed from a vehicle.
|
||||
virtual void OnRemovePassenger(Vehicle* veh, Unit* passenger) { }
|
||||
virtual void OnRemovePassenger(Vehicle* /*veh*/, Unit* /*passenger*/) { }
|
||||
};
|
||||
|
||||
class DynamicObjectScript : public ScriptObject, public UpdatableScript<DynamicObject>
|
||||
@@ -626,16 +626,16 @@ class TransportScript : public ScriptObject, public UpdatableScript<Transport>
|
||||
bool IsDatabaseBound() const { return true; }
|
||||
|
||||
// Called when a player boards the transport.
|
||||
virtual void OnAddPassenger(Transport* transport, Player* player) { }
|
||||
virtual void OnAddPassenger(Transport* /*transport*/, Player* /*player*/) { }
|
||||
|
||||
// Called when a creature boards the transport.
|
||||
virtual void OnAddCreaturePassenger(Transport* transport, Creature* creature) { }
|
||||
virtual void OnAddCreaturePassenger(Transport* /*transport*/, Creature* /*creature*/) { }
|
||||
|
||||
// Called when a player exits the transport.
|
||||
virtual void OnRemovePassenger(Transport* transport, Player* player) { }
|
||||
virtual void OnRemovePassenger(Transport* /*transport*/, Player* /*player*/) { }
|
||||
|
||||
// Called when a transport moves.
|
||||
virtual void OnRelocate(Transport* transport, uint32 mapId, float x, float y, float z) { }
|
||||
virtual void OnRelocate(Transport* /*transport*/, uint32 /*mapId*/, float /*x*/, float /*y*/, float /*z*/) { }
|
||||
};
|
||||
|
||||
class AchievementCriteriaScript : public ScriptObject
|
||||
@@ -661,31 +661,31 @@ public:
|
||||
bool IsDatabaseBound() const { return false; }
|
||||
|
||||
// Called when a player kills another player
|
||||
virtual void OnPVPKill(Player *killer, Player *killed) { }
|
||||
virtual void OnPVPKill(Player* /*killer*/, Player* /*killed*/) { }
|
||||
|
||||
// Called when a player kills a creature
|
||||
virtual void OnCreatureKill(Player *killer, Creature *killed) { }
|
||||
virtual void OnCreatureKill(Player* /*killer*/, Creature* /*killed*/) { }
|
||||
|
||||
// Called when a player is killed by a creature
|
||||
virtual void OnPlayerKilledByCreature(Creature *killer, Player *killed) { }
|
||||
virtual void OnPlayerKilledByCreature(Creature* /*killer*/, Player* /*killed*/) { }
|
||||
|
||||
// Called when a player's level changes (right before the level is applied)
|
||||
virtual void OnLevelChanged(Player *player, uint8 newLevel) { }
|
||||
virtual void OnLevelChanged(Player* /*player*/, uint8 /*newLevel*/) { }
|
||||
|
||||
// Called when a player's free talent points change (right before the change is applied)
|
||||
virtual void OnFreeTalentPointsChanged(Player *player, uint32 points) { }
|
||||
virtual void OnFreeTalentPointsChanged(Player* /*player*/, uint32 /*points*/) { }
|
||||
|
||||
// Called when a player's talent points are reset (right before the reset is done)
|
||||
virtual void OnTalentsReset(Player *player, bool no_cost) { }
|
||||
virtual void OnTalentsReset(Player* /*player*/, bool /*no_cost*/) { }
|
||||
|
||||
// Called when a player's money is modified (before the modification is done)
|
||||
virtual void OnMoneyChanged(Player *player, int32& amount) { }
|
||||
virtual void OnMoneyChanged(Player* /*player*/, int32& /*amount*/) { }
|
||||
|
||||
// Called when a player gains XP (before anything is given)
|
||||
virtual void OnGiveXP(Player *player, uint32& amount, Unit *victim) { }
|
||||
virtual void OnGiveXP(Player* /*player*/, uint32& /*amount*/, Unit* /*victim*/) { }
|
||||
|
||||
// Called when a player's reputation changes (before it is actually changed)
|
||||
virtual void OnReputationChange(Player *player, uint32 factionID, int32& standing, bool incremental) { }
|
||||
virtual void OnReputationChange(Player* /*player*/, uint32 /*factionID*/, int32& /*standing*/, bool /*incremental*/) { }
|
||||
|
||||
// Called when a player sends a chat message. param depends on the chat type:
|
||||
// CHAT_MSG_WHISPER - Player*: receiver;
|
||||
@@ -695,11 +695,11 @@ public:
|
||||
// CHAT_MSG_BATTLEGROUND, CHAT_MSG_BATTLEGROUND_LEADER - Group*: group of player;
|
||||
// CHAT_MSG_CHANNEL - Channel*: channel player speaks to;
|
||||
// other - NULL.
|
||||
virtual void OnChat(Player* player, uint32 type, uint32 lang, std::string msg, void* param = NULL) { }
|
||||
virtual void OnChat(Player* /*player*/, uint32 /*type*/, uint32 /*lang*/, std::string /*msg*/, void* /*param*/ = NULL) { }
|
||||
|
||||
// Both of the below are called on emote opcodes
|
||||
virtual void OnEmote(Player* player, uint32 emote) { }
|
||||
virtual void OnTextEmote(Player* player, uint32 text_emote, uint32 emoteNum, uint64 guid) { }
|
||||
virtual void OnEmote(Player* /*player*/, uint32 /*emote*/) { }
|
||||
virtual void OnTextEmote(Player* /*player*/, uint32 /*text_emote*/, uint32 /*emoteNum*/, uint64 /*guid*/) { }
|
||||
};
|
||||
|
||||
class GuildScript : public ScriptObject
|
||||
@@ -710,11 +710,11 @@ protected:
|
||||
public:
|
||||
bool IsDatabaseBound() const { return false; }
|
||||
|
||||
virtual void OnAddMember(Guild *guild, Player *player, uint32& plRank) { }
|
||||
virtual void OnRemoveMember(Guild *guild, Player *player, bool isDisbanding, bool isKicked) { }
|
||||
virtual void OnMOTDChanged(Guild *guild, std::string newMotd) { }
|
||||
virtual void OnGInfoChanged(Guild *guild, std::string newGInfo) { }
|
||||
virtual void OnDisband(Guild *guild) { }
|
||||
virtual void OnAddMember(Guild* /*guild*/, Player* /*player*/, uint32& /*plRank*/) { }
|
||||
virtual void OnRemoveMember(Guild* /*guild*/, Player* /*player*/, bool /*isDisbanding*/, bool /*isKicked*/) { }
|
||||
virtual void OnMOTDChanged(Guild* /*guild*/, std::string /*newMotd*/) { }
|
||||
virtual void OnGInfoChanged(Guild* /*guild*/, std::string /*newGInfo*/) { }
|
||||
virtual void OnDisband(Guild* /*guild*/) { }
|
||||
};
|
||||
|
||||
// Placed here due to ScriptRegistry::AddScript dependency.
|
||||
|
||||
@@ -46,11 +46,14 @@
|
||||
#include "Transport.h"
|
||||
|
||||
/// WorldSession constructor
|
||||
WorldSession::WorldSession(uint32 id, WorldSocket *sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter) :
|
||||
m_muteTime(mute_time), _player(NULL), m_Socket(sock),_security(sec), _accountId(id), m_expansion(expansion),
|
||||
m_sessionDbcLocale(sWorld.GetAvailableDbcLocale(locale)), m_sessionDbLocaleIndex(sObjectMgr.GetIndexForLocale(locale)),
|
||||
_logoutTime(0), m_inQueue(false), m_playerLoading(false), m_playerLogout(false), m_playerRecentlyLogout(false), m_playerSave(false),
|
||||
m_latency(0), m_TutorialsChanged(false), m_timeOutTime(0), recruiterId(recruiter)
|
||||
WorldSession::WorldSession(uint32 id, WorldSocket *sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter):
|
||||
m_muteTime(mute_time), m_timeOutTime(0), _player(NULL), m_Socket(sock),
|
||||
_security(sec), _accountId(id), m_expansion(expansion), _logoutTime(0),
|
||||
m_inQueue(false), m_playerLoading(false), m_playerLogout(false),
|
||||
m_playerRecentlyLogout(false), m_playerSave(false),
|
||||
m_sessionDbcLocale(sWorld.GetAvailableDbcLocale(locale)),
|
||||
m_sessionDbLocaleIndex(sObjectMgr.GetIndexForLocale(locale)),
|
||||
m_latency(0), m_TutorialsChanged(false), recruiterId(recruiter)
|
||||
{
|
||||
if (sock)
|
||||
{
|
||||
@@ -1012,4 +1015,4 @@ void WorldSession::ProcessQueryCallbacks()
|
||||
HandleAddIgnoreOpcodeCallBack(result);
|
||||
m_addIgnoreCallback.cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,18 +100,11 @@ struct ClientPktHeader
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
WorldSocket::WorldSocket (void) :
|
||||
WorldHandler(),
|
||||
m_Session(0),
|
||||
m_RecvWPct(0),
|
||||
m_RecvPct(),
|
||||
m_Header(sizeof (ClientPktHeader)),
|
||||
m_OutBuffer(0),
|
||||
m_OutBufferSize(65536),
|
||||
m_OutActive(false),
|
||||
m_Seed(static_cast<uint32> (rand32())),
|
||||
m_OverSpeedPings(0),
|
||||
m_LastPingTime(ACE_Time_Value::zero)
|
||||
WorldSocket::WorldSocket (void): WorldHandler(),
|
||||
m_LastPingTime(ACE_Time_Value::zero), m_OverSpeedPings(0), m_Session(0),
|
||||
m_RecvWPct(0), m_RecvPct(), m_Header(sizeof (ClientPktHeader)),
|
||||
m_OutBuffer(0), m_OutBufferSize(65536), m_OutActive(false),
|
||||
m_Seed(static_cast<uint32> (rand32()))
|
||||
{
|
||||
reference_counting_policy().value (ACE_Event_Handler::Reference_Counting_Policy::ENABLED);
|
||||
|
||||
|
||||
@@ -238,8 +238,8 @@ class ReactorRunnable : protected ACE_Task_Base
|
||||
};
|
||||
|
||||
WorldSocketMgr::WorldSocketMgr() :
|
||||
m_NetThreadsCount(0),
|
||||
m_NetThreads(0),
|
||||
m_NetThreadsCount(0),
|
||||
m_SockOutKBuff(-1),
|
||||
m_SockOutUBuff(65536),
|
||||
m_UseNoDelay(true),
|
||||
|
||||
@@ -373,10 +373,11 @@ pAuraEffectHandler AuraEffectHandler[TOTAL_AURAS]=
|
||||
&AuraEffect::HandleNoImmediateEffect, //316 SPELL_AURA_PERIODIC_HASTE implemented in AuraEffect::CalculatePeriodic
|
||||
};
|
||||
|
||||
AuraEffect::AuraEffect(Aura * base, uint8 effIndex, int32 *baseAmount, Unit * caster) :
|
||||
m_base(base), m_spellProto(base->GetSpellProto()), m_spellmod(NULL), m_periodicTimer(0),
|
||||
m_tickNumber(0), m_effIndex(effIndex), m_isPeriodic(false), m_canBeRecalculated(true),
|
||||
m_baseAmount (baseAmount ? *baseAmount : m_spellProto->EffectBasePoints[m_effIndex])
|
||||
AuraEffect::AuraEffect(Aura * base, uint8 effIndex, int32 *baseAmount, Unit * caster):
|
||||
m_base(base), m_spellProto(base->GetSpellProto()), m_effIndex(effIndex),
|
||||
m_baseAmount(baseAmount ? *baseAmount : m_spellProto->EffectBasePoints[m_effIndex]),
|
||||
m_canBeRecalculated(true), m_spellmod(NULL), m_isPeriodic(false),
|
||||
m_periodicTimer(0), m_tickNumber(0)
|
||||
{
|
||||
CalculatePeriodic(caster, true);
|
||||
|
||||
@@ -541,6 +542,8 @@ int32 AuraEffect::CalculateAmount(Unit * caster)
|
||||
DoneActualBenefit = caster->SpellBaseHealingBonus(GetSpellSchoolMask(m_spellProto)) * 0.75f;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SPELL_AURA_MANA_SHIELD:
|
||||
@@ -725,6 +728,9 @@ int32 AuraEffect::CalculateAmount(Unit * caster)
|
||||
// Dash - do not set speed if not in cat form
|
||||
if (GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID && GetSpellProto()->SpellFamilyFlags[2] & 0x00000008)
|
||||
amount = GetBase()->GetUnitOwner()->m_form == FORM_CAT ? amount : 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (DoneActualBenefit != 0.0f)
|
||||
{
|
||||
@@ -777,6 +783,8 @@ void AuraEffect::CalculatePeriodic(Unit * caster, bool create)
|
||||
m_amplitude *= IN_MILLISECONDS;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (!m_isPeriodic)
|
||||
@@ -858,6 +866,8 @@ void AuraEffect::CalculateSpellMod()
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
case SPELL_AURA_PROC_TRIGGER_SPELL:
|
||||
switch(GetId())
|
||||
@@ -875,6 +885,8 @@ void AuraEffect::CalculateSpellMod()
|
||||
}
|
||||
m_spellmod->value = GetBase()->GetUnitOwner()->CalculateSpellDamage(GetBase()->GetUnitOwner(), GetSpellProto(), 1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SPELL_AURA_ADD_FLAT_MODIFIER:
|
||||
@@ -892,6 +904,8 @@ void AuraEffect::CalculateSpellMod()
|
||||
}
|
||||
m_spellmod->value = GetAmount();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1043,6 +1057,8 @@ void AuraEffect::UpdatePeriodic(Unit * caster)
|
||||
if (m_tickNumber % 11 == 0)
|
||||
SetAmount(GetAmount() * 2);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SPELL_AURA_DUMMY:
|
||||
@@ -1158,6 +1174,8 @@ void AuraEffect::UpdatePeriodic(Unit * caster)
|
||||
slow->ChangeAmount(newAmount);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case SPELLFAMILY_MAGE:
|
||||
@@ -1178,7 +1196,12 @@ void AuraEffect::UpdatePeriodic(Unit * caster)
|
||||
}
|
||||
return;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1804,6 +1827,8 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const
|
||||
case SPELL_AURA_PERIODIC_TRIGGER_SPELL_WITH_VALUE:
|
||||
TriggerSpellWithValue(target, caster);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2061,6 +2086,8 @@ void AuraEffect::PeriodicDummyTick(Unit * target, Unit * caster) const
|
||||
target->ToPlayer()->RemoveRunesByAuraEffect(this);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2312,6 +2339,8 @@ void AuraEffect::TriggerSpell(Unit * target, Unit * caster) const
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// Reget trigger spell proto
|
||||
@@ -2499,6 +2528,8 @@ void AuraEffect::HandleShapeshiftBoosts(Unit * target, bool apply) const
|
||||
case FORM_CREATURECAT:
|
||||
case FORM_CREATUREBEAR:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (apply)
|
||||
|
||||
@@ -35,9 +35,9 @@
|
||||
#include "GridNotifiersImpl.h"
|
||||
#include "CellImpl.h"
|
||||
|
||||
AuraApplication::AuraApplication(Unit * target, Unit * caster, Aura * aura, uint8 effMask)
|
||||
: m_target(target), m_base(aura), m_slot(MAX_AURAS), m_flags(AFLAG_NONE), m_needClientUpdate(false)
|
||||
, m_removeMode(AURA_REMOVE_NONE), m_effectsToApply(effMask)
|
||||
AuraApplication::AuraApplication(Unit * target, Unit * caster, Aura * aura, uint8 effMask):
|
||||
m_target(target), m_base(aura), m_slot(MAX_AURAS), m_flags(AFLAG_NONE),
|
||||
m_effectsToApply(effMask), m_removeMode(AURA_REMOVE_NONE), m_needClientUpdate(false)
|
||||
{
|
||||
ASSERT(GetTarget() && GetBase());
|
||||
|
||||
@@ -230,6 +230,8 @@ Aura * Aura::TryCreate(SpellEntry const* spellproto, uint8 tryEffMask, WorldObje
|
||||
effMask |= 1 << i;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (uint8 realMask = effMask & tryEffMask)
|
||||
return Create(spellproto,realMask,owner,caster,baseAmount,castItem,casterGUID);
|
||||
@@ -259,6 +261,8 @@ Aura * Aura::TryCreate(SpellEntry const* spellproto, WorldObject * owner, Unit *
|
||||
effMask |= 1 << i;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (effMask)
|
||||
return Create(spellproto,effMask,owner,caster,baseAmount,castItem,casterGUID);
|
||||
@@ -315,10 +319,12 @@ Aura * Aura::Create(SpellEntry const* spellproto, uint8 effMask, WorldObject * o
|
||||
return aura;
|
||||
}
|
||||
|
||||
Aura::Aura(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit * caster, int32 *baseAmount, Item * castItem, uint64 casterGUID) :
|
||||
m_spellProto(spellproto), m_owner(owner), m_casterGuid(casterGUID ? casterGUID : caster->GetGUID()), m_castItemGuid(castItem ? castItem->GetGUID() : 0),
|
||||
m_applyTime(time(NULL)), m_timeCla(0), m_isSingleTarget(false), m_updateTargetMapInterval(0),
|
||||
m_procCharges(0), m_stackAmount(1), m_isRemoved(false), m_casterLevel(caster ? caster->getLevel() : m_spellProto->spellLevel)
|
||||
Aura::Aura(SpellEntry const* spellproto, uint8 effMask, WorldObject * owner, Unit * caster, int32 *baseAmount, Item * castItem, uint64 casterGUID):
|
||||
m_spellProto(spellproto), m_casterGuid(casterGUID ? casterGUID : caster->GetGUID()),
|
||||
m_castItemGuid(castItem ? castItem->GetGUID() : 0), m_applyTime(time(NULL)),
|
||||
m_owner(owner), m_timeCla(0), m_updateTargetMapInterval(0),
|
||||
m_casterLevel(caster ? caster->getLevel() : m_spellProto->spellLevel), m_procCharges(0), m_stackAmount(1),
|
||||
m_isRemoved(false), m_isSingleTarget(false)
|
||||
{
|
||||
if (m_spellProto->manaPerSecond || m_spellProto->manaPerSecondPerLevel)
|
||||
m_timeCla = 1 * IN_MILLISECONDS;
|
||||
@@ -1247,6 +1253,8 @@ void Aura::HandleAuraSpecificMods(AuraApplication const * aurApp, Unit * caster,
|
||||
case POWER_RAGE: triggeredSpellId = 63653; break;
|
||||
case POWER_ENERGY: triggeredSpellId = 63655; break;
|
||||
case POWER_RUNIC_POWER: triggeredSpellId = 63652; break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (triggeredSpellId)
|
||||
caster->CastSpell(target, triggeredSpellId, true);
|
||||
|
||||
@@ -421,9 +421,9 @@ void SpellCastTargets::write (ByteBuffer & data)
|
||||
data << m_strTarget;
|
||||
}
|
||||
|
||||
Spell::Spell(Unit* Caster, SpellEntry const *info, bool triggered, uint64 originalCasterGUID, Spell** triggeringContainer, bool skipCheck)
|
||||
: m_spellInfo(sSpellMgr.GetSpellForDifficultyFromSpell(info, Caster)), m_spellValue(new SpellValue(m_spellInfo))
|
||||
, m_caster(Caster)
|
||||
Spell::Spell(Unit* Caster, SpellEntry const *info, bool triggered, uint64 originalCasterGUID, Spell** triggeringContainer, bool skipCheck):
|
||||
m_spellInfo(sSpellMgr.GetSpellForDifficultyFromSpell(info, Caster)),
|
||||
m_caster(Caster), m_spellValue(new SpellValue(m_spellInfo))
|
||||
{
|
||||
m_customAttr = sSpellMgr.GetSpellCustomAttr(m_spellInfo->Id);
|
||||
m_skipCheck = skipCheck;
|
||||
@@ -666,6 +666,8 @@ void Spell::SelectSpellTargets()
|
||||
if (Player* owner = ObjectAccessor::FindPlayer(((Corpse*)result)->GetOwnerGUID()))
|
||||
AddUnitTarget(owner, i);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1827,8 +1829,8 @@ void Spell::SearchChainTarget(std::list<Unit*> &TagUnitMap, float max_range, uin
|
||||
|
||||
if (cur->GetDistance(*next) > CHAIN_SPELL_JUMP_RADIUS)
|
||||
break;
|
||||
while (m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MELEE
|
||||
&& !m_caster->isInFrontInMap(*next, max_range)
|
||||
while ((m_spellInfo->DmgClass == SPELL_DAMAGE_CLASS_MELEE
|
||||
&& !m_caster->isInFrontInMap(*next, max_range))
|
||||
|| !m_caster->canSeeOrDetect(*next, false)
|
||||
|| !cur->IsWithinLOSInMap(*next))
|
||||
{
|
||||
@@ -2537,6 +2539,9 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur)
|
||||
{
|
||||
case TYPEID_UNIT:
|
||||
m_targets.setDst(*result);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -731,8 +731,8 @@ namespace Trinity
|
||||
|
||||
SpellNotifierCreatureAndPlayer(Unit *source, std::list<Unit*> &data, float radius, SpellNotifyPushType type,
|
||||
SpellTargets TargetType = SPELL_TARGETS_ENEMY, const Position *pos = NULL, uint32 entry = 0)
|
||||
: i_source(source), i_data(&data), i_radius(radius), i_push_type(type)
|
||||
, i_TargetType(TargetType), i_pos(pos), i_entry(entry)
|
||||
: i_data(&data), i_push_type(type), i_radius(radius), i_TargetType(TargetType),
|
||||
i_source(source), i_entry(entry), i_pos(pos)
|
||||
{
|
||||
ASSERT(i_source);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class _SpellScript
|
||||
virtual void Register() = 0;
|
||||
// Function called on server startup, if returns false script won't be used in core
|
||||
// use for: dbc/template data presence/correctness checks
|
||||
virtual bool Validate(SpellEntry const * spellEntry) {return true;};
|
||||
virtual bool Validate(SpellEntry const * /*spellEntry*/) {return true;};
|
||||
// Function called when script is created, if returns false script will be unloaded afterwards
|
||||
// use for: initializing local script variables (DO NOT USE CONSTRUCTOR FOR THIS PURPOSE!)
|
||||
virtual bool Load() {return true;};
|
||||
|
||||
Reference in New Issue
Block a user