Kitzunu 2021-01-10 14:27:55 +01:00 committed by GitHub
parent 7cf097eab2
commit da4edd547d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
315 changed files with 3 additions and 729 deletions

View file

@ -23,7 +23,6 @@ class DynamicMapTree
DynTreeImpl* impl;
public:
DynamicMapTree();
~DynamicMapTree();

View file

@ -42,7 +42,6 @@ template<class T,
class RegularGrid2D
{
public:
enum
{
CELL_NUMBER = 64,

View file

@ -42,7 +42,6 @@ namespace VMAP
{
private:
public:
static bool collisionLocationForMovingPointFixedAABox(
const G3D::Vector3& origin,
const G3D::Vector3& dir,
@ -50,7 +49,6 @@ namespace VMAP
G3D::Vector3& location,
bool& Inside)
{
// Integer representation of a floating-point value.
#define IR(x) (reinterpret_cast<G3D::uint32 const&>(x))

View file

@ -85,6 +85,5 @@ public:
private:
struct bignum_st* _bn;
};
#endif

View file

@ -71,7 +71,6 @@ public:
DBCFileLoader& file;
friend class DBCFileLoader;
};
// Get record by id

View file

@ -216,7 +216,6 @@ public:
}
private:
void Enqueue(SQLOperation* op)
{
_queue->enqueue(op);

View file

@ -18,7 +18,6 @@ class Field
friend class PreparedResultSet;
public:
[[nodiscard]] bool GetBool() const // Wrapper, actually gets integer
{
return (GetUInt8() == 1);
@ -224,7 +223,6 @@ public:
}
#endif
return static_cast<char const*>(data.value);
}
[[nodiscard]] std::string GetString() const

View file

@ -307,7 +307,6 @@ bool MySQLConnection::_Query(PreparedStatement* stmt, MYSQL_RES** pResult, uint6
*pFieldCount = mysql_stmt_field_count(msql_STMT);
return true;
}
}

View file

@ -40,7 +40,6 @@ public:
SQLQueryHolderTask(SQLQueryHolder* holder, QueryResultHolderFuture res)
: m_holder(holder), m_result(res) { };
bool Execute() override;
};
#endif
#endif

View file

@ -93,7 +93,6 @@ private:
void FreeBindBuffer();
void CleanUp();
bool _NextRow();
};
typedef std::shared_ptr<PreparedResultSet> PreparedQueryResult;

View file

@ -48,7 +48,6 @@ inline LPTSTR ErrorMessage(DWORD dw)
sprintf(msgBuf, "Unknown error: %u", dw);
return msgBuf;
}
}
//============================== Global Variables =============================
@ -794,7 +793,6 @@ void WheatyExceptionReport::WriteStackDetails(
&sip.si)) // Address of the SYMBOL_INFO structure (inside "sip" object)
{
Log(_T("%hs+%I64X"), sip.si.Name, symDisplacement);
}
else // No symbol found. Print out the logical address instead.
{
@ -837,7 +835,6 @@ void WheatyExceptionReport::WriteStackDetails(
Log(_T("\r\n"));
}
}
}
//////////////////////////////////////////////////////////////////////////////
@ -853,7 +850,6 @@ BOOL CALLBACK WheatyExceptionReport::EnumerateSymbolsCallback(
{
ClearSymbols();
FormatSymbolValue(pSymInfo, (STACKFRAME64*)UserContext);
}
__except (EXCEPTION_EXECUTE_HANDLER)
{

View file

@ -134,7 +134,6 @@ struct SymbolDetail
class WheatyExceptionReport
{
public:
WheatyExceptionReport();
~WheatyExceptionReport();
@ -196,7 +195,6 @@ private:
static void PushSymbolDetail();
static void PopSymbolDetail();
static void PrintSymbolDetail();
};
extern WheatyExceptionReport g_WheatyExceptionReport; // global instance of class

View file

@ -367,7 +367,6 @@ public:
lt.tm_year = ((packedDate >> 24) & 0x1F) + 100;
return uint32(mktime(&lt));
}
ByteBuffer& ReadPackedTime(uint32& time)

View file

@ -28,7 +28,6 @@ namespace ACE_Based
volatile bool _canceled{false};
public:
//! Create a LockedQueue.
LockedQueue()

View file

@ -23,7 +23,6 @@ private:
std::atomic<bool> _shutdown;
public:
ProducerConsumerQueue<T>() : _shutdown(false) { }
void Push(const T& value)

View file

@ -20,7 +20,6 @@ namespace acore
class GeneralLock
{
public:
GeneralLock(MUTEX& m)
: i_mutex(m)
{
@ -33,7 +32,6 @@ namespace acore
}
private:
GeneralLock(const GeneralLock&);
GeneralLock& operator=(const GeneralLock&);
MUTEX& i_mutex;
@ -43,7 +41,6 @@ namespace acore
class SingleThreaded
{
public:
struct Lock // empty object
{
Lock()
@ -63,7 +60,6 @@ namespace acore
class ObjectLevelLockable
{
public:
ObjectLevelLockable()
: i_mtx()
{
@ -74,19 +70,16 @@ namespace acore
class Lock
{
public:
Lock(ObjectLevelLockable<T, MUTEX>& host)
: i_lock(host.i_mtx)
{
}
private:
GeneralLock<MUTEX> i_lock;
};
private:
// prevent the compiler creating a copy construct
ObjectLevelLockable(const ObjectLevelLockable<T, MUTEX>&);
ObjectLevelLockable<T, MUTEX>& operator=(const ObjectLevelLockable<T, MUTEX>&);
@ -98,7 +91,6 @@ namespace acore
class ClassLevelLockable
{
public:
ClassLevelLockable()
{
}
@ -108,7 +100,6 @@ namespace acore
class Lock
{
public:
Lock(const T& /*host*/)
{
ClassLevelLockable<T, MUTEX>::si_mtx.lock();
@ -131,7 +122,6 @@ namespace acore
};
private:
static MUTEX si_mtx;
};
}

View file

@ -102,7 +102,6 @@ bool WinServiceInstall()
&sfa); // new data
CloseServiceHandle(service);
}
}
CloseServiceHandle(serviceControlManager);

View file

@ -51,7 +51,6 @@ inline uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
struct IntervalTimer
{
public:
IntervalTimer()
{
@ -96,7 +95,6 @@ public:
}
private:
time_t _interval{0};
time_t _current{0};
};
@ -104,7 +102,6 @@ private:
struct TimeTracker
{
public:
TimeTracker(time_t expiry)
: i_expiryTime(expiry)
{
@ -131,14 +128,12 @@ public:
}
private:
time_t i_expiryTime;
};
struct TimeTrackerSmall
{
public:
TimeTrackerSmall(uint32 expiry = 0)
: i_expiryTime(expiry)
{
@ -165,14 +160,12 @@ public:
}
private:
int32 i_expiryTime;
};
struct PeriodicTimer
{
public:
PeriodicTimer(int32 period, int32 start_time)
: i_period(period), i_expireTime(start_time)
{
@ -199,7 +192,6 @@ public:
void TReset(int32 diff, int32 period) { i_expireTime += period > diff ? period : diff; }
private:
int32 i_period;
int32 i_expireTime;
};

View file

@ -172,7 +172,6 @@ void stripLineInvisibleChars(std::string& str)
str.erase(wpos, str.size());
if (str.find("|TInterface") != std::string::npos)
str.clear();
}
std::string secsToTimeString(uint64 timeInSecs, bool shortText)

View file

@ -35,7 +35,6 @@ enum SpecialPets
class PetAI : public CreatureAI
{
public:
explicit PetAI(Creature* c);
void UpdateAI(uint32) override;

View file

@ -14,7 +14,6 @@ class Unit;
class ReactorAI : public CreatureAI
{
public:
explicit ReactorAI(Creature* c) : CreatureAI(c) {}
void MoveInLineOfSight(Unit*) override {}

View file

@ -16,7 +16,6 @@ class Totem;
class TotemAI : public CreatureAI
{
public:
explicit TotemAI(Creature* c);
void MoveInLineOfSight(Unit* who) override;

View file

@ -116,7 +116,6 @@ namespace FactorySelector
}*/
return (mv_factory == NULL ? NULL : mv_factory->Create(creature));
}
GameObjectAI* SelectGameObjectAI(GameObject* go)

View file

@ -104,7 +104,6 @@ void npc_escortAI::MoveInLineOfSight(Unit* who)
}
AttackStart(who);
}
}
void npc_escortAI::JustDied(Unit* /*killer*/)

View file

@ -1172,7 +1172,6 @@ void SmartGameObjectAI::SpellHit(Unit* unit, const SpellInfo* spellInfo)
class SmartTrigger : public AreaTriggerScript
{
public:
SmartTrigger() : AreaTriggerScript("SmartTrigger") {}
bool OnTrigger(Player* player, AreaTrigger const* trigger) override

View file

@ -2630,7 +2630,6 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
}
else
(*itr)->ToCreature()->SetHomePosition((*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ(), (*itr)->GetOrientation());
}
delete targets;
}

View file

@ -307,7 +307,6 @@ private:
mStoredEvents.erase(i);
return;
}
}
}
}
@ -321,7 +320,6 @@ private:
{
return (*i);
}
}
}
SmartScriptHolder s;

View file

@ -1099,7 +1099,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
}
case SMART_ACTION_EQUIP:
{
if (e.GetScriptType() == SMART_SCRIPT_TYPE_CREATURE)
{
int8 equipId = (int8)e.action.equip.entry;

View file

@ -702,7 +702,6 @@ struct SmartAction
struct
{
uint32 emote1;
uint32 emote2;
uint32 emote3;
@ -1697,7 +1696,6 @@ public:
bool active;
bool runOnce;
bool enableTimed;
};
typedef std::unordered_map<uint32, WayPoint*> WPPath;

View file

@ -614,7 +614,6 @@ void AchievementMgr::LoadFromDB(PreparedQueryResult achievementResult, PreparedQ
if (CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(titleId))
if (!GetPlayer()->HasTitle(titleEntry))
GetPlayer()->SetTitle(titleEntry);
} while (achievementResult->NextRow());
}
@ -758,7 +757,6 @@ static const uint32 achievIdForDungeon[][4] =
*/
void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1 /*= 0*/, uint32 miscValue2 /*= 0*/, Unit* unit /*= NULL*/)
{
// disable for gamemasters with GM-mode enabled
if (m_player->IsGameMaster())
return;
@ -1114,7 +1112,6 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui
continue;
SetCriteriaProgress(achievementCriteria, 1, PROGRESS_ACCUMULATE);
break;
}
case ACHIEVEMENT_CRITERIA_TYPE_KILLED_BY_CREATURE:
// AchievementMgr::UpdateAchievementCriteria might also be called on login - skip in this case
@ -2432,7 +2429,6 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
uint32 loaded = 0;
for (uint32 entryId = 0; entryId < sAchievementCriteriaStore.GetNumRows(); ++entryId)
{
AchievementCriteriaEntry const* criteria = sAchievementCriteriaStore.LookupEntry(entryId);
if (!criteria)
continue;
@ -2583,7 +2579,6 @@ void AchievementGlobalMgr::LoadAchievementReferenceList()
for (uint32 entryId = 0; entryId < sAchievementStore.GetNumRows(); ++entryId)
{
AchievementEntry const* achievement = sAchievementStore.LookupEntry(entryId);
if (!achievement || !achievement->refAchievement)
continue;
@ -2894,7 +2889,6 @@ void AchievementGlobalMgr::LoadRewards()
m_achievementRewards[entry] = reward;
++count;
} while (result->NextRow());
sLog->outString(">> Loaded %u achievement rewards in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@ -2939,7 +2933,6 @@ void AchievementGlobalMgr::LoadRewardLocales()
ObjectMgr::AddLocaleString(Subject, locale, data.Subject);
ObjectMgr::AddLocaleString(Text, locale, data.Text);
} while (result->NextRow());
sLog->outString(">> Loaded %lu Achievement Reward Locale strings in %u ms", (unsigned long)m_achievementRewardLocales.size(), GetMSTimeDiffToNow(oldMSTime));

View file

@ -292,7 +292,6 @@ void AuctionHouseMgr::LoadAuctionItems()
do
{
Field* fields = result->Fetch();
uint32 item_guid = fields[11].GetUInt32();

View file

@ -79,7 +79,6 @@ struct AuctionEntry
bool LoadFromFieldList(Field* fields);
[[nodiscard]] std::string BuildAuctionMailSubject(MailAuctionAnswers response) const;
static std::string BuildAuctionMailBody(uint32 lowGuid, uint32 bid, uint32 buyout, uint32 deposit, uint32 cut);
};
//this class is used as auctionhouse instance
@ -134,7 +133,6 @@ private:
~AuctionHouseMgr();
public:
typedef std::unordered_map<uint32, Item*> ItemMap;
static AuctionHouseMgr* instance();
@ -163,7 +161,6 @@ public:
static AuctionHouseEntry const* GetAuctionHouseEntry(uint32 factionTemplateId);
public:
//load first auction items, because of check if item exists, when loading
void LoadAuctionItems();
void LoadAuctions();
@ -174,7 +171,6 @@ public:
void Update();
private:
AuctionHouseObject mHordeAuctions;
AuctionHouseObject mAllianceAuctions;
AuctionHouseObject mNeutralAuctions;

View file

@ -983,7 +983,6 @@ void BattlefieldWG::UpdatedDestroyedTowerCount(TeamId team, GameObject* go)
if (go && player->GetDistance2d(go) < 100.0f)
player->KilledMonsterCredit(NPC_QUEST_VEHICLE_PROTECTED, 0);
}
}
}

View file

@ -175,7 +175,6 @@ public:
void FinishGame(int32 mod, const Map* bgMap);
protected:
uint32 TeamId;
uint8 Type;
std::string TeamName;

View file

@ -112,7 +112,6 @@ public:
//one selection pool for horde, other one for alliance
SelectionPool m_SelectionPools[BG_TEAMS_COUNT];
private:
BattlegroundTypeId m_bgTypeId;
ArenaType m_arenaType;
uint32 m_WaitTimes[BG_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS][COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME];

View file

@ -117,7 +117,6 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff)
void BattlegroundAB::StartingEventCloseDoors()
{
for (uint32 obj = BG_AB_OBJECT_BANNER_NEUTRAL; obj < BG_AB_DYNAMIC_NODES_COUNT * BG_AB_OBJECTS_PER_NODE; ++obj)
SpawnBGObject(obj, RESPAWN_ONE_DAY);
for (uint32 i = 0; i < BG_AB_DYNAMIC_NODES_COUNT * 3; ++i)

View file

@ -1001,7 +1001,6 @@ const float BG_AV_CreaturePos[AV_CPLACE_MAX][4] =
enum BG_AV_CreatureIds
{
AV_NPC_A_TOWERDEFENSE = 0, // stormpike bowman
AV_NPC_A_GRAVEDEFENSE0 = 1, // stormpike Defender
AV_NPC_A_GRAVEDEFENSE1 = 2, // seasoned defender
@ -1053,7 +1052,6 @@ enum BG_AV_CreatureIds
AV_NPC_S_MINE_H_4 = 46,
AV_NPC_HERALD = 47,
AV_NPC_INFO_MAX = 48
};
const uint32 BG_AV_CreatureInfo[AV_NPC_INFO_MAX] =
@ -1242,7 +1240,6 @@ const float BG_AV_StaticCreaturePos[AV_STATICCPLACE_MAX][5] =
{773.651f, -497.482f, 99.0408f, 2.11185f, 46 }, //14284 - Stormpike Battleguard
{949.1f, -506.913f, 95.4237f, 3.31613f, 46 }, //14284 - Stormpike Battleguard
{-1370.9f, -219.793f, 98.4258f, 5.04381f, 47}, //drek thar
};
const uint32 BG_AV_StaticCreatureInfo[51] =
@ -1452,7 +1449,6 @@ enum BG_AV_WorldStates
AV_FROSTWOLFE_UNUSED = 1393,
AV_FROSTWOLFW_UNUSED = 1392
*/
};
//alliance_control neutral_control horde_control

View file

@ -29,7 +29,6 @@ BattlegroundBE::BattlegroundBE()
BattlegroundBE::~BattlegroundBE()
{
}
void BattlegroundBE::StartingEventCloseDoors()

View file

@ -37,7 +37,6 @@ BattlegroundDS::BattlegroundDS()
BattlegroundDS::~BattlegroundDS()
{
}
void BattlegroundDS::PostUpdateImpl(uint32 diff)

View file

@ -350,7 +350,6 @@ void BattlegroundIC::HandleAreaTrigger(Player* player, uint32 trigger)
player->CastSpell(player, SPELL_BACK_DOOR_JOB, true);
break;
}
}
void BattlegroundIC::UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor)
@ -950,7 +949,6 @@ void BattlegroundIC::DestroyGate(Player* /*player*/, GameObject* go)
void BattlegroundIC::EventPlayerDamagedGO(Player* /*player*/, GameObject* /*go*/, uint32 /*eventType*/)
{
}
GraveyardStruct const* BattlegroundIC::GetClosestGraveyard(Player* player)

View file

@ -29,7 +29,6 @@ BattlegroundNA::BattlegroundNA()
BattlegroundNA::~BattlegroundNA()
{
}
void BattlegroundNA::StartingEventCloseDoors()

View file

@ -29,7 +29,6 @@ BattlegroundRL::BattlegroundRL()
BattlegroundRL::~BattlegroundRL()
{
}
void BattlegroundRL::StartingEventCloseDoors()

View file

@ -978,12 +978,10 @@ void Channel::SendToAllWatching(WorldPacket* data)
void Channel::Voice(uint64 /*guid1*/, uint64 /*guid2*/)
{
}
void Channel::DeVoice(uint64 /*guid1*/, uint64 /*guid2*/)
{
}
void Channel::MakeNotifyPacket(WorldPacket* data, uint8 notify_type)

View file

@ -124,7 +124,6 @@ protected:
bool ShowHelpForSubCommands(std::vector<ChatCommand> const& table, char const* cmd, char const* subcmd);
private:
WorldSession* m_session; // != NULL for chat command call and NULL for CLI command
// common global flag

View file

@ -65,7 +65,6 @@ public:
[[nodiscard]] bool matchesTypeMask(uint32 pMask) const { return iType & pMask; }
void setType(uint32 pType) { iType = pType; }
};
//==============================================================

View file

@ -717,7 +717,6 @@ bool ConditionMgr::IsObjectMeetToConditionList(ConditionSourceInfo& sourceInfo,
sLog->outDebug(LOG_FILTER_CONDITIONSYS, "IsPlayerMeetToConditionList: Reference template -%u not found", (*i)->ReferenceId);
#endif
}
}
else //handle normal condition
{
@ -919,7 +918,6 @@ void ConditionMgr::LoadConditions(bool isReload)
do
{
Field* fields = result->Fetch();
Condition* cond = new Condition();

View file

@ -64,7 +64,6 @@ namespace lfg
class LFGQueue
{
public:
// Add/Remove from queue
void AddToQueue(uint64 guid, bool failedProposal = false);
void RemoveFromQueue(uint64 guid, bool partial = false); // xinef: partial remove, dont delete data from list!

View file

@ -436,7 +436,6 @@ typedef std::map<uint32, time_t> CreatureSpellCooldowns;
class Creature : public Unit, public GridObject<Creature>, public MovableMapObject
{
public:
explicit Creature(bool isWorldObject = false);
~Creature() override;

View file

@ -16,7 +16,6 @@
class Bag : public Item
{
public:
Bag();
~Bag() override;
@ -49,7 +48,6 @@ public:
void BuildCreateUpdateBlockForPlayer(UpdateData* data, Player* target) const override;
protected:
// Bag Storage space
Item* m_bagslot[MAX_BAG_SIZE];
};

View file

@ -328,7 +328,6 @@ public:
DataMap CustomData;
protected:
Object();
void _InitValues();
@ -635,7 +634,6 @@ struct MovementInfo
}
float zspeed, sinAngle, cosAngle, xyspeed;
} jump;
// spline

View file

@ -81,7 +81,6 @@ void Pet::AddToWorld()
GetCharmInfo()->SetIsFollowing(false);
GetCharmInfo()->SetIsReturning(false);
}
}
void Pet::RemoveFromWorld()
@ -839,7 +838,6 @@ bool Guardian::InitStatsForLevel(uint8 petlevel)
}
case SUMMON_PET:
{
if (pInfo)
{
SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(pInfo->min_dmg));
@ -1192,7 +1190,6 @@ void Pet::_SaveSpellCooldowns(SQLTransaction& trans, bool logout)
stmt->setUInt32(1, itr2->first);
stmt->setUInt32(2, cooldown);
trans->Append(stmt);
}
}
}
@ -2329,7 +2326,6 @@ void Pet::RemoveSpellCooldown(uint32 spell_id, bool update /* = false */)
if (update)
{
if (Player* playerOwner = GetCharmerOrOwnerPlayerOrPlayerItself())
{
WorldPacket data(SMSG_CLEAR_COOLDOWN, 4 + 8);

View file

@ -185,7 +185,6 @@ enum PetScalingSpells
SPELL_DK_PET_SCALING_01 = 51996,
SPELL_DK_PET_SCALING_02 = 54566,
SPELL_DK_PET_SCALING_03 = 61697
};
#define PET_FOLLOW_DIST 1.0f

View file

@ -2644,7 +2644,6 @@ void Player::RegenerateAll()
// xinef: if grace is started, increase it but no more than cap
else if (uint32 grace = GetGracePeriod(i))
{
if (grace < RUNE_GRACE_PERIOD)
SetGracePeriod(i, std::min<uint32>(grace + m_regenTimer, RUNE_GRACE_PERIOD));
}
@ -4110,7 +4109,6 @@ bool Player::IsNeedCastPassiveSpellAtLearn(SpellInfo const* spellInfo) const
ShapeshiftForm form = GetShapeshiftForm();
return (!spellInfo->Stances || (form && (spellInfo->Stances & (1 << (form - 1)))) ||
(!form && spellInfo->HasAttribute(SPELL_ATTR2_NOT_NEED_SHAPESHIFT)));
}
void Player::learnSpell(uint32 spellId)
@ -8653,7 +8651,6 @@ void Player::CastItemCombatSpell(Unit* target, WeaponAttackType attType, uint32
if (spellData.SpellPPMRate)
{
uint32 WeaponSpeed = GetAttackTime(attType);
chance = GetPPMProcChance(WeaponSpeed, spellData.SpellPPMRate, spellInfo);
}
@ -18837,7 +18834,6 @@ void Player::_LoadInventory(PreparedQueryResult result, uint32 timeDiff)
delete item;
continue;
}
}
// Item's state may have changed after storing

View file

@ -1042,11 +1042,9 @@ public: // constructors
void SetInAcceptProcess(bool state) { m_acceptProccess = state; }
private: // internal functions
void Update(bool for_trader = true);
private: // fields
Player* m_player; // Player who own of this TradeData
Player* m_trader; // Player who trade with m_player

View file

@ -2375,7 +2375,6 @@ MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackTy
MeleeHitOutcome Unit::RollMeleeOutcomeAgainst(const Unit* victim, WeaponAttackType attType, int32 crit_chance, int32 miss_chance, int32 dodge_chance, int32 parry_chance, int32 block_chance) const
{
if (victim->GetTypeId() == TYPEID_UNIT && victim->ToCreature()->IsEvadingAttacks())
return MELEE_HIT_EVADE;
@ -9929,7 +9928,6 @@ void Unit::ModifyAuraState(AuraStateType flag, bool apply)
if( AuraApplication* aurApp = (*itr).second->GetApplicationOfTarget(GetGUID()) )
(*itr).second->HandleAllEffects(aurApp, AURA_EFFECT_HANDLE_REAL, true);
}
}
}
else
@ -11297,7 +11295,6 @@ int32 Unit::SpellBaseDamageBonusDone(SpellSchoolMask schoolMask)
for (AuraEffectList::const_iterator i = mDamageDonebyAP.begin(); i != mDamageDonebyAP.end(); ++i)
if ((*i)->GetMiscValue() & schoolMask)
DoneAdvertisedBenefit += int32(CalculatePct(GetTotalAttackPowerValue(BASE_ATTACK), (*i)->GetAmount()));
}
return DoneAdvertisedBenefit;
}
@ -12766,7 +12763,6 @@ void Unit::Dismount()
void Unit::SetInCombatWith(Unit* enemy, uint32 duration)
{
// Xinef: Dont allow to start combat with triggers
if (enemy->GetTypeId() == TYPEID_UNIT && enemy->ToCreature()->IsTrigger())
return;
@ -12793,7 +12789,6 @@ void Unit::SetInCombatWith(Unit* enemy, uint32 duration)
void Unit::CombatStart(Unit* target, bool initialAggro)
{
// Xinef: Dont allow to start combat with triggers
if (target->GetTypeId() == TYPEID_UNIT && target->ToCreature()->IsTrigger())
return;
@ -13078,7 +13073,6 @@ bool Unit::_IsValidAttackTarget(Unit const* target, SpellInfo const* bySpell, Wo
if (FactionState const* repState = player->GetReputationMgr().GetState(factionEntry))
if (!(repState->Flags & FACTION_FLAG_AT_WAR))
return false;
}
}
}
@ -14081,7 +14075,6 @@ int32 Unit::ModSpellDuration(SpellInfo const* spellProto, Unit const* target, in
{
// else positive mods here, there are no currently
// when there will be, change GetTotalAuraModifierByMiscValue to GetTotalPositiveAuraModifierByMiscValue
}
// Glyphs which increase duration of selfcasted buffs
@ -15762,7 +15755,6 @@ void Unit::ProcDamageAndSpellFor(bool isVictim, Unit* target, uint32 procFlag, u
takeCharges = true;
else if (triggeredByAura->GetAmount()) // aura must have amount
{
int32 damageLeft = triggeredByAura->GetAmount();
// No damage left
if (damageLeft < int32(damage))
@ -16339,7 +16331,6 @@ float Unit::CalculateDefaultCoefficient(SpellInfo const* spellInfo, DamageEffect
float DotFactor = 1.0f;
if (damagetype == DOT)
{
int32 DotDuration = spellInfo->GetDuration();
if (!spellInfo->IsChanneled() && DotDuration > 0)
DotFactor = DotDuration / 15000.0f;
@ -16740,7 +16731,6 @@ bool Unit::HandleAuraRaidProcFromChargeWithValue(AuraEffect* triggeredByAura)
// heal
CastCustomSpell(this, 33110, &heal, nullptr, nullptr, true, nullptr, nullptr, caster_guid);
return true;
}
bool Unit::HandleAuraRaidProcFromCharge(AuraEffect* triggeredByAura)
{

View file

@ -1231,7 +1231,6 @@ public:
[[nodiscard]] ReactStates GetPlayerReactState() const { return _oldReactState; }
private:
Unit* _unit;
UnitActionBarEntry PetActionBar[MAX_UNIT_ACTION_BAR_INDEX];
CharmSpellInfo _charmspells[4];

View file

@ -273,7 +273,6 @@ void GameEventMgr::LoadFromDB()
SetHolidayEventTime(pGameEvent);
}
} while (result->NextRow());
sLog->outString(">> Loaded %u game events in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@ -1007,7 +1006,6 @@ void GameEventMgr::LoadHolidayDates()
}
++count;
} while (result->NextRow());
sLog->outString(">> Loaded %u holiday dates in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@ -1819,7 +1817,6 @@ void GameEventMgr::SetHolidayEventTime(GameEventData& event)
// date is due and not a singleDate event, try with next DBC date (modified by holiday_dates)
// if none is found we don't modify start date and use the one in game_event
}
}
}

View file

@ -32,7 +32,6 @@ template <class T>
class HashMapHolder
{
public:
typedef std::unordered_map<uint64, T*> MapType;
typedef ACE_RW_Thread_Mutex LockType;
@ -60,7 +59,6 @@ public:
static LockType* GetLock() { return &i_lock; }
private:
//Non instanceable only static
HashMapHolder() = default;

View file

@ -385,7 +385,6 @@ void ObjectMgr::LoadCreatureLocales()
AddLocaleString(Name, locale, data.Name);
AddLocaleString(Title, locale, data.Title);
} while (result->NextRow());
sLog->outString(">> Loaded %lu Сreature Locale strings in %u ms", (unsigned long)_creatureLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
@ -420,7 +419,6 @@ void ObjectMgr::LoadGossipMenuItemsLocales()
AddLocaleString(OptionText, locale, data.OptionText);
AddLocaleString(BoxText, locale, data.BoxText);
} while (result->NextRow());
sLog->outString(">> Loaded %u Gossip Menu Option Locale strings in %u ms", (uint32)_gossipMenuItemsLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
@ -452,7 +450,6 @@ void ObjectMgr::LoadPointOfInterestLocales()
continue;
AddLocaleString(Name, locale, data.Name);
} while (result->NextRow());
sLog->outString(">> Loaded %u Points Of Interest Locale strings in %u ms", (uint32)_pointOfInterestLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
@ -1862,7 +1859,6 @@ void ObjectMgr::LoadCreatures()
AddCreatureToGrid(guid, &data);
++count;
} while (result->NextRow());
sLog->outString(">> Loaded %u creatures in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@ -2306,7 +2302,6 @@ void ObjectMgr::LoadItemLocales()
AddLocaleString(Name, locale, data.Name);
AddLocaleString(Description, locale, data.Description);
} while (result->NextRow());
sLog->outString(">> Loaded %u Item Locale strings in %u ms", (uint32)_itemLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
@ -2931,7 +2926,6 @@ void ObjectMgr::LoadItemSetNameLocales()
continue;
AddLocaleString(Name, locale, data.Name);
} while (result->NextRow());
sLog->outString(">> Loaded %u Item Set Name Locale strings in %u ms", uint32(_itemSetNameLocaleStore.size()), GetMSTimeDiffToNow(oldMSTime));
@ -4667,7 +4661,6 @@ void ObjectMgr::LoadQuestLocales()
for (uint8 i = 0; i < 4; ++i)
AddLocaleString(fields[i + 7].GetString(), locale, data.ObjectiveText[i]);
} while (result->NextRow());
sLog->outString(">> Loaded %u Quest Locale strings in %u ms", (uint32)_questLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
@ -5100,7 +5093,6 @@ void ObjectMgr::LoadSpellScriptNames()
do
{
Field* fields = result->Fetch();
int32 spellId = fields[0].GetInt32();
@ -5246,7 +5238,6 @@ void ObjectMgr::LoadPageTexts()
PageTextContainer::const_iterator itr2 = _pageTextStore.find(itr->second.NextPage);
if (itr2 == _pageTextStore.end())
sLog->outErrorDb("Page text (Id: %u) has not existing next page (Id: %u)", itr->first, itr->second.NextPage);
}
}
@ -5287,7 +5278,6 @@ void ObjectMgr::LoadPageTextLocales()
LocaleConstant locale = GetLocaleByName(LocaleName);
AddLocaleString(Text, locale, data.Text);
} while (result->NextRow());
sLog->outString(">> Loaded %u Page Text Locale strings in %u ms", (uint32)_pageTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
@ -5466,7 +5456,6 @@ void ObjectMgr::LoadGossipText()
do
{
cic = 0;
Field* fields = result->Fetch();
@ -5508,7 +5497,6 @@ void ObjectMgr::LoadGossipText()
}
count++;
} while (result->NextRow());
sLog->outString(">> Loaded %u npc texts in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@ -5546,7 +5534,6 @@ void ObjectMgr::LoadNpcTextLocales()
AddLocaleString(fields[2 + i * 2].GetString(), locale, data.Text_0[i]);
AddLocaleString(fields[3 + i * 2].GetString(), locale, data.Text_1[i]);
}
} while (result->NextRow());
sLog->outString(">> Loaded %u Npc Text Locale strings in %u ms", (uint32)_npcTextLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
@ -5728,7 +5715,6 @@ void ObjectMgr::LoadQuestAreaTriggers()
}
_questAreaTriggerStore[trigger_ID] = quest_ID;
} while (result->NextRow());
sLog->outString(">> Loaded %u quest trigger points in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@ -5759,7 +5745,6 @@ void ObjectMgr::LoadQuestOfferRewardLocale()
QuestOfferRewardLocale& data = _questOfferRewardLocaleStore[id];
AddLocaleString(fields[2].GetString(), locale, data.RewardText);
} while (result->NextRow());
sLog->outString(">> Loaded %lu Quest Offer Reward locale strings in %u ms", _questOfferRewardLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
@ -5789,7 +5774,6 @@ void ObjectMgr::LoadQuestRequestItemsLocale()
QuestRequestItemsLocale& data = _questRequestItemsLocaleStore[id];
AddLocaleString(fields[2].GetString(), locale, data.CompletionText);
} while (result->NextRow());
sLog->outString(">> Loaded %lu Quest Request Items locale strings in %u ms", _questRequestItemsLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
@ -6020,7 +6004,6 @@ void ObjectMgr::LoadAreaTriggers()
}
_areaTriggerStore[at.entry] = at;
} while (result->NextRow());
sLog->outString(">> Loaded %u area trigger definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@ -6082,7 +6065,6 @@ void ObjectMgr::LoadAreaTriggerTeleports()
}
_areaTriggerTeleportStore[Trigger_ID] = at;
} while (result->NextRow());
sLog->outString(">> Loaded %u area trigger teleport definitions in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@ -6452,7 +6434,6 @@ void ObjectMgr::LoadGameObjectLocales()
AddLocaleString(Name, locale, data.Name);
AddLocaleString(CastBarCaption, locale, data.CastBarCaption);
} while (result->NextRow());
sLog->outString(">> Loaded %u Gameobject Locale strings in %u ms", (uint32)_gameObjectLocaleStore.size(), GetMSTimeDiffToNow(oldMSTime));
@ -7817,7 +7798,6 @@ bool ObjectMgr::LoadAcoreStrings()
for (uint8 i = 0; i < TOTAL_LOCALES; ++i)
AddLocaleString(fields[i + 1].GetString(), LocaleConstant(i), data.Content);
} while (result->NextRow());
sLog->outString(">> Loaded %u acore strings in %u ms", (uint32)_acoreStringStore.size(), GetMSTimeDiffToNow(oldMSTime));
@ -8424,7 +8404,6 @@ void ObjectMgr::LoadGossipMenu()
}
_gossipMenusStore.insert(GossipMenusContainer::value_type(gMenu.MenuID, gMenu));
} while (result->NextRow());
sLog->outString(">> Loaded %u gossip_menu entries in %u ms", (uint32)_gossipMenusStore.size(), GetMSTimeDiffToNow(oldMSTime));
@ -8497,7 +8476,6 @@ void ObjectMgr::LoadGossipMenuItems()
}
_gossipMenuItemsStore.insert(GossipMenuItemsContainer::value_type(gMenuItem.MenuID, gMenuItem));
} while (result->NextRow());
sLog->outString(">> Loaded %u gossip_menu_option entries in %u ms", uint32(_gossipMenuItemsStore.size()), GetMSTimeDiffToNow(oldMSTime));

View file

@ -36,7 +36,6 @@ class Grid
// allows the GridLoader to access its internals
template<class A, class T, class O> friend class GridLoader;
public:
/** destructor to clean up its resources. This includes unloading the
grid if it has not been unload.
*/
@ -113,7 +112,6 @@ public:
return i_container.GetElements().isEmpty();
}*/
private:
TypeMapContainer<GRID_OBJECT_TYPES> i_container;
TypeMapContainer<WORLD_OBJECT_TYPES> i_objects;
//typedef std::set<void*> ActiveGridObjects;

View file

@ -182,7 +182,6 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
SendPacket(&data);
sScriptMgr->OnPlayerJoinBG(_player);
}
// check if group can queue:
else

View file

@ -618,7 +618,6 @@ void WorldSession::SendStablePetCallback(PreparedQueryResult result, uint64 guid
data.put<uint8>(wpos, num); // set real data to placeholder
SendPacket(&data);
}
void WorldSession::SendStableResult(uint8 res)

View file

@ -46,7 +46,6 @@ class InstanceSave
{
friend class InstanceSaveManager;
public:
InstanceSave(uint16 MapId, uint32 InstanceId, Difficulty difficulty, time_t resetTime, time_t extendedResetTime);
~InstanceSave();
[[nodiscard]] uint32 GetInstanceId() const { return m_instanceid; }
@ -80,7 +79,6 @@ public:
typedef std::list<uint32> PlayerListType;
private:
PlayerListType m_playerList;
time_t m_resetTime;
time_t m_extendedResetTime;

View file

@ -121,7 +121,6 @@ typedef std::map<uint32 /*entry*/, MinionInfo> MinionInfoMap;
class InstanceScript : public ZoneScript
{
public:
explicit InstanceScript(Map* map) : instance(map), completedEncounters(0) {}
~InstanceScript() override {}

View file

@ -579,7 +579,6 @@ private:
void UpdateActiveCells(const float& x, const float& y, const uint32 t_diff);
protected:
ACE_Thread_Mutex Lock;
ACE_Thread_Mutex GridLock;
ACE_RW_Thread_Mutex MMapLock;

View file

@ -428,7 +428,6 @@ void TransportMgr::SpawnContinentTransports()
if (!tInfo->inInstance)
if (CreateTransport(entry, guid))
++count;
} while (result->NextRow());
}
@ -456,7 +455,6 @@ void TransportMgr::SpawnContinentTransports()
map->LoadGrid(x, y);
++count;
}
} while (result->NextRow());
}

View file

@ -198,7 +198,6 @@ BanReturn BanManager::BanIP(std::string const& IP, std::string const& Duration,
if (WorldSession* session = sWorld->FindOfflineSession(AccountID))
if (session->GetPlayerName() != Author)
session->KickPlayer("Ban IP at condition 'FindOfflineSession(account)->GetPlayerName() != author'");
} while (resultAccounts->NextRow());
LoginDatabase.CommitTransaction(trans);

View file

@ -19,7 +19,6 @@ enum BanReturn
class BanManager
{
public:
static BanManager* instance();
BanReturn BanAccount(std::string const& AccountName, std::string const& Duration, std::string const& Reason, std::string const& Author);

View file

@ -50,7 +50,6 @@ void Graveyard::LoadGraveyardFromDB()
_graveyardStore[ID] = Graveyard;
++Count;
} while (result->NextRow());
sLog->outString(">> Loaded %i graveyard in %u ms", Count, GetMSTimeDiffToNow(oldMSTime));
@ -347,7 +346,6 @@ void Graveyard::LoadGraveyardZones()
if (!AddGraveyardLink(safeLocId, zoneId, teamId, false))
sLog->outErrorDb("Table `graveyard_zone` has a duplicate record for Graveyard (ID: %u) and Zone (ID: %u), skipped.", safeLocId, zoneId);
} while (result->NextRow());
sLog->outString(">> Loaded %u graveyard-zone links in %u ms", count, GetMSTimeDiffToNow(oldMSTime));

View file

@ -44,7 +44,6 @@ public:
void LoadGraveyardFromDB();
private:
GraveyardContainer _graveyardStore;
// for wintergrasp only

View file

@ -14,6 +14,5 @@ class TargetedMovementGeneratorBase;
class FollowerRefManager : public RefManager<Unit, TargetedMovementGeneratorBase>
{
};
#endif

View file

@ -93,7 +93,6 @@ private:
}
void InitTop();
public:
explicit MotionMaster(Unit* unit) : _expList(nullptr), _top(-1), _owner(unit), _cleanFlag(MMCF_NONE)
{
for (uint8 i = 0; i < MAX_MOTION_SLOT; ++i)

View file

@ -60,7 +60,6 @@ void ConfusedMovementGenerator<T>::DoInitialize(T* unit)
i_waypoints[idx][2] = idx > 0 ? i_waypoints[idx - 1][2] : z;
continue;
}
}
else
{

View file

@ -18,7 +18,6 @@ template <>
class HomeMovementGenerator<Creature> : public MovementGeneratorMedium< Creature, HomeMovementGenerator<Creature> >
{
public:
HomeMovementGenerator() : arrived(false), i_recalculateTravel(false) {}
~HomeMovementGenerator() {}

View file

@ -12,7 +12,6 @@
class IdleMovementGenerator : public MovementGenerator
{
public:
void Initialize(Unit*) override;
void Finalize(Unit*) override { }
void Reset(Unit*) override;

View file

@ -100,7 +100,6 @@ class PathGenerator
}
private:
dtPolyRef _pathPolyRefs[MAX_PATH_LENGTH]; // array of detour polygon references
uint32 _polyLength; // number of polygons in the path

View file

@ -60,7 +60,6 @@ public:
void LoadPath(Creature*);
private:
void Stop(int32 time) { i_nextMoveTime.Reset(time);}
bool Stopped() { return !i_nextMoveTime.Passed();}

View file

@ -59,7 +59,6 @@ namespace Movement
class MoveSplineInit
{
public:
explicit MoveSplineInit(Unit* m);
/* Final pass of initialization that launches spline movement.
@ -147,7 +146,6 @@ namespace Movement
*/
void DisableTransportPathTransformations();
protected:
MoveSplineInitArgs args;
Unit* unit;
};

View file

@ -24,7 +24,6 @@ namespace Movement
{
static void WriteCommonMonsterMovePart(const MoveSpline& mov, ByteBuffer& data);
public:
static void WriteMonsterMove(const MoveSpline& mov, ByteBuffer& data);
static void WriteStopMovement(Vector3 const& loc, uint32 splineId, ByteBuffer& data);
static void WriteCreate(const MoveSpline& mov, ByteBuffer& data);

View file

@ -78,7 +78,6 @@ namespace Movement
void UninitializedSplineInitMethod(Vector3 const*, index_type, bool, index_type) { ABORT(); }
public:
explicit SplineBase() {}
/** Caclulates the position for given segment Idx, and percent of segment length t
@ -133,12 +132,10 @@ namespace Movement
typedef length_type LengthType;
typedef std::vector<length_type> LengthArray;
protected:
LengthArray lengths;
[[nodiscard]] index_type computeIndexInBounds(length_type length) const;
public:
explicit Spline() = default;
/** Calculates the position for given t

View file

@ -145,6 +145,5 @@ void WaypointMgr::ReloadPath(uint32 id)
wp->event_chance = fields[8].GetUInt8();
path.push_back(wp);
} while (result->NextRow());
}

View file

@ -77,7 +77,6 @@ typedef std::set<uint64> PlayerSet;
class OPvPCapturePoint
{
public:
OPvPCapturePoint(OutdoorPvP* pvp);
virtual ~OPvPCapturePoint() {}
@ -129,7 +128,6 @@ public:
float rotation0 = 0, float rotation1 = 0, float rotation2 = 0, float rotation3 = 0);
protected:
bool AddObject(uint32 type, uint32 entry, uint32 map, float x, float y, float z, float o,
float rotation0, float rotation1, float rotation2, float rotation3);
bool AddCreature(uint32 type, uint32 entry, uint32 map, float x, float y, float z, float o, uint32 spawntimedelay = 0);
@ -140,7 +138,6 @@ protected:
bool DelCapturePoint();
protected:
// active players in the area of the objective, 0 - alliance, 1 - horde
PlayerSet m_activePlayers[2];
@ -180,7 +177,6 @@ class OutdoorPvP : public ZoneScript
friend class OutdoorPvPMgr;
public:
// ctor
OutdoorPvP();
@ -237,7 +233,6 @@ public:
void TeamApplyBuff(TeamId teamId, uint32 spellId, uint32 spellId2 = 0, Player* sameMapPlr = nullptr);
protected:
// the map of the objectives belonging to this outdoorpvp
OPvPCapturePointMap m_capturePoints;

View file

@ -942,7 +942,6 @@ void PoolMgr::LoadFromDB()
void PoolMgr::LoadQuestPools()
{
}
void PoolMgr::SaveQuestsToDB(bool daily, bool weekly, bool other)

View file

@ -70,7 +70,6 @@ template class ScriptRegistry<MailScript>;
ScriptMgr::ScriptMgr()
: _scriptCount(0), _scheduledScripts(0)
{
}
ScriptMgr::~ScriptMgr()
@ -498,7 +497,6 @@ void ScriptMgr::OnGroupRateCalculation(float& rate, uint32 count, bool isRaid)
continue; \
if (C->MapID == V->GetId()) \
{
#define SCR_MAP_END \
return; \
} \
@ -720,7 +718,6 @@ bool ScriptMgr::OnItemRemove(Player* player, Item* item)
#endif
GET_SCRIPT_RET(ItemScript, item->GetScriptId(), tmpscript, false);
return tmpscript->OnRemove(player, item);
}
bool ScriptMgr::OnCastItemCombatSpell(Player* player, Unit* victim, SpellInfo const* spellInfo, Item* item)

View file

@ -148,7 +148,6 @@ class ScriptObject
friend class ScriptMgr;
public:
// Do not override this in scripts; it should be overridden by the various script type classes. It indicates
// whether or not this script type must be assigned in the database.
[[nodiscard]] virtual bool IsDatabaseBound() const { return false; }
@ -158,7 +157,6 @@ public:
[[nodiscard]] const std::string& GetName() const { return _name; }
protected:
ScriptObject(const char* name)
: _name(std::string(name))
{
@ -167,29 +165,24 @@ protected:
virtual ~ScriptObject() = default;
private:
const std::string _name;
};
template<class TObject> class UpdatableScript
{
protected:
UpdatableScript() = default;
public:
virtual void OnUpdate(TObject* /*obj*/, uint32 /*diff*/) { }
};
class SpellScriptLoader : public ScriptObject
{
protected:
SpellScriptLoader(const char* name);
public:
[[nodiscard]] bool IsDatabaseBound() const override { return true; }
// Should return a fully valid SpellScript pointer.
@ -202,11 +195,9 @@ public:
class ServerScript : public ScriptObject
{
protected:
ServerScript(const char* name);
public:
// Called when reactive socket I/O is started (WorldSocketMgr).
virtual void OnNetworkStart() { }
@ -232,11 +223,9 @@ public:
class WorldScript : public ScriptObject
{
protected:
WorldScript(const char* name);
public:
// Called when the open/closed state of the world changes.
virtual void OnOpenStateChange(bool /*open*/) { }
@ -271,11 +260,9 @@ public:
class FormulaScript : public ScriptObject
{
protected:
FormulaScript(const char* name);
public:
// Called after calculating honor.
virtual void OnHonorCalculation(float& /*honor*/, uint8 /*level*/, float /*multiplier*/) { }
@ -307,7 +294,6 @@ template<class TMap> class MapScript : public UpdatableScript<TMap>
uint32 _mapId;
protected:
MapScript(uint32 mapId)
: _mapId(mapId)
{
@ -350,11 +336,9 @@ public:
class WorldMapScript : public ScriptObject, public MapScript<Map>
{
protected:
WorldMapScript(const char* name, uint32 mapId);
public:
[[nodiscard]] bool isAfterLoadScript() const override { return true; }
void checkValidity() override
@ -369,11 +353,9 @@ public:
class InstanceMapScript : public ScriptObject, public MapScript<InstanceMap>
{
protected:
InstanceMapScript(const char* name, uint32 mapId);
public:
[[nodiscard]] bool IsDatabaseBound() const override { return true; }
void checkValidity() override
@ -391,11 +373,9 @@ public:
class BattlegroundMapScript : public ScriptObject, public MapScript<BattlegroundMap>
{
protected:
BattlegroundMapScript(const char* name, uint32 mapId);
public:
[[nodiscard]] bool isAfterLoadScript() const override { return true; }
void checkValidity() override
@ -410,11 +390,9 @@ public:
class ItemScript : public ScriptObject
{
protected:
ItemScript(const char* name);
public:
[[nodiscard]] bool IsDatabaseBound() const override { return true; }
// Called when a player accepts a quest from the item.
@ -442,7 +420,6 @@ public:
class UnitScript : public ScriptObject
{
protected:
UnitScript(const char* name, bool addToScripts = true);
public:
@ -474,11 +451,9 @@ public:
class MovementHandlerScript : public ScriptObject
{
protected:
MovementHandlerScript(const char* name);
public:
//Called whenever a player moves
virtual void OnPlayerMove(Player* /*player*/, MovementInfo /*movementInfo*/, uint32 /*opcode*/) { }
};
@ -486,11 +461,9 @@ public:
class AllMapScript : public ScriptObject
{
protected:
AllMapScript(const char* name);
public:
// Called when a player enters any Map
virtual void OnPlayerEnterAll(Map* /*map*/, Player* /*player*/) { }
@ -501,11 +474,9 @@ public:
class AllCreatureScript : public ScriptObject
{
protected:
AllCreatureScript(const char* name);
public:
// Called from End of Creature Update.
virtual void OnAllCreatureUpdate(Creature* /*creature*/, uint32 /*diff*/) { }
@ -516,11 +487,9 @@ public:
class CreatureScript : public ScriptObject, public UpdatableScript<Creature>
{
protected:
CreatureScript(const char* name);
public:
[[nodiscard]] bool IsDatabaseBound() const override { return true; }
// Called when a player opens a gossip dialog with the creature.
@ -554,11 +523,9 @@ public:
class GameObjectScript : public ScriptObject, public UpdatableScript<GameObject>
{
protected:
GameObjectScript(const char* name);
public:
[[nodiscard]] bool IsDatabaseBound() const override { return true; }
// Called when a player opens a gossip dialog with the gameobject.
@ -598,11 +565,9 @@ public:
class AreaTriggerScript : public ScriptObject
{
protected:
AreaTriggerScript(const char* name);
public:
[[nodiscard]] bool IsDatabaseBound() const override { return true; }
// Called when the area trigger is activated by a player.
@ -612,11 +577,9 @@ public:
class BattlegroundScript : public ScriptObject
{
protected:
BattlegroundScript(const char* name);
public:
[[nodiscard]] bool IsDatabaseBound() const override { return true; }
// Should return a fully valid Battleground object for the type ID.
@ -627,11 +590,9 @@ public:
class OutdoorPvPScript : public ScriptObject
{
protected:
OutdoorPvPScript(const char* name);
public:
[[nodiscard]] bool IsDatabaseBound() const override { return true; }
// Should return a fully valid OutdoorPvP object for the type ID.
@ -641,11 +602,9 @@ public:
class CommandScript : public ScriptObject
{
protected:
CommandScript(const char* name);
public:
// Should return a pointer to a valid command table (ChatCommand array) to be used by ChatHandler.
[[nodiscard]] virtual std::vector<ChatCommand> GetCommands() const = 0;
};
@ -653,11 +612,9 @@ public:
class WeatherScript : public ScriptObject, public UpdatableScript<Weather>
{
protected:
WeatherScript(const char* name);
public:
[[nodiscard]] bool IsDatabaseBound() const override { return true; }
// Called when the weather changes in the zone this script is associated with.
@ -667,11 +624,9 @@ public:
class AuctionHouseScript : public ScriptObject
{
protected:
AuctionHouseScript(const char* name);
public:
// Called when an auction is added to an auction house.
virtual void OnAuctionAdd(AuctionHouseObject* /*ah*/, AuctionEntry* /*entry*/) { }
@ -709,11 +664,9 @@ public:
class ConditionScript : public ScriptObject
{
protected:
ConditionScript(const char* name);
public:
[[nodiscard]] bool IsDatabaseBound() const override { return true; }
// Called when a single condition is checked for a player.
@ -723,11 +676,9 @@ public:
class VehicleScript : public ScriptObject
{
protected:
VehicleScript(const char* name);
public:
// Called after a vehicle is installed.
virtual void OnInstall(Vehicle* /*veh*/) { }
@ -750,18 +701,15 @@ public:
class DynamicObjectScript : public ScriptObject, public UpdatableScript<DynamicObject>
{
protected:
DynamicObjectScript(const char* name);
};
class TransportScript : public ScriptObject, public UpdatableScript<Transport>
{
protected:
TransportScript(const char* name);
public:
[[nodiscard]] bool IsDatabaseBound() const override { return true; }
// Called when a player boards the transport.
@ -780,11 +728,9 @@ public:
class AchievementCriteriaScript : public ScriptObject
{
protected:
AchievementCriteriaScript(const char* name);
public:
[[nodiscard]] bool IsDatabaseBound() const override { return true; }
// deprecated/legacy
@ -794,7 +740,6 @@ public:
class PlayerScript : public ScriptObject
{
protected:
PlayerScript(const char* name);
public:
@ -1009,11 +954,9 @@ public:
class AccountScript : public ScriptObject
{
protected:
AccountScript(const char* name);
public:
// Called when an account logged in successfully
virtual void OnAccountLogin(uint32 /*accountId*/) { }
@ -1036,11 +979,9 @@ public:
class GuildScript : public ScriptObject
{
protected:
GuildScript(const char* name);
public:
[[nodiscard]] bool IsDatabaseBound() const override { return false; }
// Called when a member is added to the guild.
@ -1079,11 +1020,9 @@ public:
class GroupScript : public ScriptObject
{
protected:
GroupScript(const char* name);
public:
[[nodiscard]] bool IsDatabaseBound() const override { return false; }
// Called when a member is added to a group.
@ -1106,11 +1045,9 @@ public:
class GlobalScript : public ScriptObject
{
protected:
GlobalScript(const char* name);
public:
// items
virtual void OnItemDelFromDB(SQLTransaction& /*trans*/, uint32 /*itemGuid*/) { }
virtual void OnMirrorImageDisplayItem(const Item* /*item*/, uint32& /*display*/) { }
@ -1136,11 +1073,9 @@ public:
class BGScript : public ScriptObject
{
protected:
BGScript(const char* name);
public:
[[nodiscard]] bool IsDatabaseBound() const override { return false; }
// Start Battlegroud
@ -1191,16 +1126,13 @@ public:
class SpellSC : public ScriptObject
{
protected:
SpellSC(const char* name);
public:
[[nodiscard]] bool IsDatabaseBound() const override { return false; }
// Calculate max duration in applying aura
virtual void OnCalcMaxDuration(Aura const* /*aura*/, int32& /*maxDuration*/) { }
};
// this class can be used to be extended by Modules
@ -1208,7 +1140,6 @@ public:
class ModuleScript : public ScriptObject
{
protected:
ModuleScript(const char* name);
};
@ -1228,11 +1159,9 @@ public:
class MailScript : public ScriptObject
{
protected:
MailScript(const char* name);
public:
// Called before mail is sent
virtual void OnBeforeMailDraftSendMailTo(MailDraft* /*mailDraft*/, MailReceiver const& /*receiver*/, MailSender const& /*sender*/, MailCheckMask& /*checked*/, uint32& /*deliver_delay*/, uint32& /*custom_expiration*/, bool& /*deleteMailItemsFromDB*/, bool& /*sendMail*/) { }
};
@ -1243,12 +1172,10 @@ class ScriptMgr
friend class ScriptObject;
private:
ScriptMgr();
virtual ~ScriptMgr();
public: /* Initialization */
static ScriptMgr* instance();
void Initialize();
void LoadDatabase();
@ -1261,17 +1188,14 @@ public: /* Initialization */
uint32 GetScriptCount() const { return _scriptCount; }
public: /* Unloading */
void Unload();
public: /* SpellScriptLoader */
void CreateSpellScripts(uint32 spellId, std::list<SpellScript*>& scriptVector);
void CreateAuraScripts(uint32 spellId, std::list<AuraScript*>& scriptVector);
void CreateSpellScriptLoaders(uint32 spellId, std::vector<std::pair<SpellScriptLoader*, std::multimap<uint32, uint32>::iterator> >& scriptVector);
public: /* ServerScript */
void OnNetworkStart();
void OnNetworkStop();
void OnSocketOpen(WorldSocket* socket);
@ -1280,7 +1204,6 @@ public: /* ServerScript */
void OnPacketSend(WorldSession* session, WorldPacket const& packet);
public: /* WorldScript */
void OnLoadCustomDatabaseTable();
void OnOpenStateChange(bool open);
void OnBeforeConfigLoad(bool reload);
@ -1293,7 +1216,6 @@ public: /* WorldScript */
void OnShutdown();
public: /* FormulaScript */
void OnHonorCalculation(float& honor, uint8 level, float multiplier);
void OnGrayLevelCalculation(uint8& grayLevel, uint8 playerLevel);
void OnColorCodeCalculation(XPColorChar& color, uint8 playerLevel, uint8 mobLevel);
@ -1304,7 +1226,6 @@ public: /* FormulaScript */
void OnAfterArenaRatingCalculation(Battleground* const bg, int32& winnerMatchmakerChange, int32& loserMatchmakerChange, int32& winnerChange, int32& loserChange);
public: /* MapScript */
void OnCreateMap(Map* map);
void OnDestroyMap(Map* map);
void OnLoadGridMap(Map* map, GridMap* gmap, uint32 gx, uint32 gy);
@ -1314,11 +1235,9 @@ public: /* MapScript */
void OnMapUpdate(Map* map, uint32 diff);
public: /* InstanceMapScript */
InstanceScript* CreateInstanceScript(InstanceMap* map);
public: /* ItemScript */
bool OnQuestAccept(Player* player, Item* item, Quest const* quest);
bool OnItemUse(Player* player, Item* item, SpellCastTargets const& targets);
bool OnItemExpire(Player* player, ItemTemplate const* proto);
@ -1328,7 +1247,6 @@ public: /* ItemScript */
void OnGossipSelectCode(Player* player, Item* item, uint32 sender, uint32 action, const char* code);
public: /* CreatureScript */
bool OnGossipHello(Player* player, Creature* creature);
bool OnGossipSelect(Player* player, Creature* creature, uint32 sender, uint32 action);
bool OnGossipSelectCode(Player* player, Creature* creature, uint32 sender, uint32 action, const char* code);
@ -1341,7 +1259,6 @@ public: /* CreatureScript */
void OnCreatureUpdate(Creature* creature, uint32 diff);
public: /* GameObjectScript */
bool OnGossipHello(Player* player, GameObject* go);
bool OnGossipSelect(Player* player, GameObject* go, uint32 sender, uint32 action);
bool OnGossipSelectCode(Player* player, GameObject* go, uint32 sender, uint32 action, const char* code);
@ -1356,28 +1273,22 @@ public: /* GameObjectScript */
GameObjectAI* GetGameObjectAI(GameObject* go);
public: /* AreaTriggerScript */
bool OnAreaTrigger(Player* player, AreaTrigger const* trigger);
public: /* BattlegroundScript */
Battleground* CreateBattleground(BattlegroundTypeId typeId);
public: /* OutdoorPvPScript */
OutdoorPvP* CreateOutdoorPvP(OutdoorPvPData const* data);
public: /* CommandScript */
std::vector<ChatCommand> GetChatCommands();
public: /* WeatherScript */
void OnWeatherChange(Weather* weather, WeatherState state, float grade);
void OnWeatherUpdate(Weather* weather, uint32 diff);
public: /* AuctionHouseScript */
void OnAuctionAdd(AuctionHouseObject* ah, AuctionEntry* entry);
void OnAuctionRemove(AuctionHouseObject* ah, AuctionEntry* entry);
void OnAuctionSuccessful(AuctionHouseObject* ah, AuctionEntry* entry);
@ -1391,11 +1302,9 @@ public: /* AuctionHouseScript */
void OnBeforeAuctionHouseMgrUpdate();
public: /* ConditionScript */
bool OnConditionCheck(Condition* condition, ConditionSourceInfo& sourceInfo);
public: /* VehicleScript */
void OnInstall(Vehicle* veh);
void OnUninstall(Vehicle* veh);
void OnReset(Vehicle* veh);
@ -1404,11 +1313,9 @@ public: /* VehicleScript */
void OnRemovePassenger(Vehicle* veh, Unit* passenger);
public: /* DynamicObjectScript */
void OnDynamicObjectUpdate(DynamicObject* dynobj, uint32 diff);
public: /* TransportScript */
void OnAddPassenger(Transport* transport, Player* player);
void OnAddCreaturePassenger(Transport* transport, Creature* creature);
void OnRemovePassenger(Transport* transport, Player* player);
@ -1416,11 +1323,9 @@ public: /* TransportScript */
void OnRelocate(Transport* transport, uint32 waypointId, uint32 mapId, float x, float y, float z);
public: /* AchievementCriteriaScript */
bool OnCriteriaCheck(uint32 scriptId, Player* source, Unit* target);
public: /* PlayerScript */
void OnBeforePlayerUpdate(Player* player, uint32 p_time);
void OnPlayerReleasedGhost(Player* player);
void OnPVPKill(Player* killer, Player* killed);
@ -1496,7 +1401,6 @@ public: /* PlayerScript */
void OnBeforeLoadPetFromDB(Player* player, uint32& petentry, uint32& petnumber, bool& current, bool& forceLoadFromDB);
public: /* AccountScript */
void OnAccountLogin(uint32 accountId);
void OnFailedAccountLogin(uint32 accountId);
void OnEmailChange(uint32 accountId);
@ -1505,7 +1409,6 @@ public: /* AccountScript */
void OnFailedPasswordChange(uint32 accountId);
public: /* GuildScript */
void OnGuildAddMember(Guild* guild, Player* player, uint8& plRank);
void OnGuildRemoveMember(Guild* guild, Player* player, bool isDisbanding, bool isKicked);
void OnGuildMOTDChanged(Guild* guild, const std::string& newMotd);
@ -1520,7 +1423,6 @@ public: /* GuildScript */
void OnGuildBankEvent(Guild* guild, uint8 eventType, uint8 tabId, uint32 playerGuid, uint32 itemOrMoney, uint16 itemStackCount, uint8 destTabId);
public: /* GroupScript */
void OnGroupAddMember(Group* group, uint64 guid);
void OnGroupInviteMember(Group* group, uint64 guid);
void OnGroupRemoveMember(Group* group, uint64 guid, RemoveMethod method, uint64 kicker, const char* reason);
@ -1540,14 +1442,12 @@ public: /* GlobalScript */
void OnBeforeWorldObjectSetPhaseMask(WorldObject const* worldObject, uint32& oldPhaseMask, uint32& newPhaseMask, bool& useCombinedPhases, bool& update);
public: /* Scheduled scripts */
uint32 IncreaseScheduledScriptsCount() { return ++_scheduledScripts; }
uint32 DecreaseScheduledScriptCount() { return --_scheduledScripts; }
uint32 DecreaseScheduledScriptCount(size_t count) { return _scheduledScripts -= count; }
bool IsScriptScheduled() const { return _scheduledScripts > 0; }
public: /* UnitScript */
void OnHeal(Unit* healer, Unit* reciever, uint32& gain);
void OnDamage(Unit* attacker, Unit* victim, uint32& damage);
void ModifyPeriodicDamageAurasTick(Unit* target, Unit* attacker, uint32& damage);
@ -1558,23 +1458,19 @@ public: /* UnitScript */
void OnBeforeRollMeleeOutcomeAgainst(const Unit* attacker, const Unit* victim, WeaponAttackType attType, int32& attackerMaxSkillValueForLevel, int32& victimMaxSkillValueForLevel, int32& attackerWeaponSkill, int32& victimDefenseSkill, int32& crit_chance, int32& miss_chance, int32& dodge_chance, int32& parry_chance, int32& block_chance);
public: /* MovementHandlerScript */
void OnPlayerMove(Player* player, MovementInfo movementInfo, uint32 opcode);
public: /* AllCreatureScript */
//listener function (OnAllCreatureUpdate) is called by OnCreatureUpdate
//void OnAllCreatureUpdate(Creature* creature, uint32 diff);
void Creature_SelectLevel(const CreatureTemplate* cinfo, Creature* creature);
public: /* AllMapScript */
//listener functions are called by OnPlayerEnterMap and OnPlayerLeaveMap
//void OnPlayerEnterAll(Map* map, Player* player);
//void OnPlayerLeaveAll(Map* map, Player* player);
public: /* BGScript */
void OnBattlegroundStart(Battleground* bg);
void OnBattlegroundEndReward(Battleground* bg, Player* player, TeamId winnerTeamId);
void OnBattlegroundUpdate(Battleground* bg, uint32 diff);
@ -1589,7 +1485,6 @@ public: /* BGScript */
bool CanSendMessageQueue(BattlegroundQueue* queue, Player* leader, Battleground* bg, PvPDifficultyEntry const* bracketEntry);
public: /* Arena Team Script */
void OnGetSlotByType(const uint32 type, uint8& slot);
void OnGetArenaPoints(ArenaTeam* at, float& points);
void OnArenaTypeIDToQueueID(const BattlegroundTypeId bgTypeId, const uint8 arenaType, uint32& queueTypeID);
@ -1597,20 +1492,16 @@ public: /* Arena Team Script */
void OnSetArenaMaxPlayersPerTeam(const uint8 arenaType, uint32& maxPlayerPerTeam);
public: /* SpellSC */
void OnCalcMaxDuration(Aura const* aura, int32& maxDuration);
public: /* GameEventScript */
void OnGameEventStart(uint16 EventID);
void OnGameEventStop(uint16 EventID);
public: /* MailScript */
void OnBeforeMailDraftSendMailTo(MailDraft* mailDraft, MailReceiver const& receiver, MailSender const& sender, MailCheckMask& checked, uint32& deliver_delay, uint32& custom_expiration, bool& deleteMailItemsFromDB, bool& sendMail);
private:
uint32 _scriptCount;
//atomic op counter for active scripts amount
@ -1623,7 +1514,6 @@ template<class TScript>
class ScriptRegistry
{
public:
typedef std::map<uint32, TScript*> ScriptMap;
typedef typename ScriptMap::iterator ScriptMapIterator;

View file

@ -389,7 +389,6 @@ public:
void SetCalendarEventCreationCooldown(time_t cooldown) { _calendarEventCreationCooldown = cooldown; }
public: // opcodes handlers
void Handle_NULL(WorldPacket& recvPacket); // not used
void Handle_EarlyProccess(WorldPacket& recvPacket); // just mark packets processed in WorldSocket::OnRead
void Handle_ServerSide(WorldPacket& recvPacket); // sever side only, can't be accepted from client

View file

@ -191,7 +191,6 @@ private:
bool m_OutActive;
uint32 m_Seed;
};
#endif /* _WORLDSOCKET_H */

View file

@ -30,7 +30,6 @@ public:
}
protected:
virtual int handle_timeout(const ACE_Time_Value& /*current_time*/, const void* /*act = 0*/)
{
sLog->outBasic("Resuming acceptor");

View file

@ -42,7 +42,6 @@
class ReactorRunnable : protected ACE_Task_Base
{
public:
ReactorRunnable() :
m_Reactor(0),
m_Connections(0),
@ -115,7 +114,6 @@ public:
}
protected:
void AddNewSockets()
{
ACORE_GUARD(ACE_Thread_Mutex, m_NewSockets_Lock);

View file

@ -1511,7 +1511,6 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
}
break;
}
}
// mods at aura remove
else

View file

@ -48,7 +48,6 @@ private:
void _InitFlags(Unit* caster, uint8 effMask);
void _HandleEffect(uint8 effIndex, bool apply);
public:
Unit* GetTarget() const { return _target; }
Aura* GetBase() const { return _base; }

View file

@ -784,7 +784,6 @@ void Spell::SelectExplicitTargets()
m_targets.SetUnitTarget(redirect);
m_spellFlags |= SPELL_FLAG_REDIRECTED;
}
}
}
}
@ -5589,7 +5588,6 @@ SpellCastResult Spell::CheckCast(bool strict)
}
break;
}
}
// Spell casted only on battleground
if (m_spellInfo->HasAttribute(SPELL_ATTR3_BATTLEGROUND) && m_caster->GetTypeId() == TYPEID_PLAYER)

View file

@ -241,7 +241,6 @@ class Spell
friend void Unit::SetCurrentCastedSpell(Spell* pSpell);
friend class SpellScript;
public:
void EffectNULL(SpellEffIndex effIndex);
void EffectUnused(SpellEffIndex effIndex);
void EffectDistract(SpellEffIndex effIndex);

View file

@ -3005,7 +3005,6 @@ void Spell::EffectEnchantItemTmp(SpellEffIndex effIndex)
{
sLog->outError("Spell::EffectEnchantItemTmp: unknown spell id %i", spell_id);
return;
}
for (int j = BASE_ATTACK; j <= OFF_ATTACK; ++j)

View file

@ -387,7 +387,6 @@ bool SpellMgr::ComputeIsSpellValid(SpellInfo const* spellInfo, bool msg)
sLog->outErrorDb("Craft spell %u not have create item entry.", spellInfo->Id);
return false;
}
}
// also possible IsLootCrafting case but fake item must exist anyway
else if (!sObjectMgr->GetItemTemplate(spellInfo->Effects[i].ItemType))
@ -1422,7 +1421,6 @@ void SpellMgr::LoadSpellRequired()
// xinef: fill additionalTalentInfo data, currently Blessing of Sanctuary only
if (GetTalentSpellCost(spellReq) > 0)
mTalentSpellAdditionalSet.insert(spellId);
} while (result->NextRow());
sLog->outString(">> Loaded %u spell required records in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
@ -1531,7 +1529,6 @@ void SpellMgr::LoadSpellTargetPositions()
sLog->outErrorDb("Spell (Id: %u, effIndex: %u) listed in `spell_target_position` does not have target TARGET_DEST_DB (17).", Spell_ID, effIndex);
continue;
}
} while (result->NextRow());
/*
@ -2368,7 +2365,6 @@ void SpellMgr::LoadPetDefaultSpells()
CreatureTemplateContainer const* ctc = sObjectMgr->GetCreatureTemplates();
for (CreatureTemplateContainer::const_iterator itr = ctc->begin(); itr != ctc->end(); ++itr)
{
if (!itr->second.PetSpellDataId)
continue;
@ -7237,7 +7233,6 @@ void SpellMgr::LoadDbcDataCorrections()
spellInfo2->rangeIndex = 187; // 300yd
}
}
}
if (spellInfo->activeIconID == 2158) // flight

View file

@ -694,7 +694,6 @@ private:
// Modifiers
public:
// Loading data at server startup
void UnloadSpellInfoChains();
void LoadSpellTalentRanks();

View file

@ -461,7 +461,6 @@ class AuraScript : public _SpellScript
// internal use classes & functions
// DO NOT THESE IN SCRIPTS
public:
#define AURASCRIPT_FUNCTION_TYPE_DEFINES(CLASSNAME) \
typedef bool(CLASSNAME::*AuraCheckAreaTargetFnType)(Unit* target); \
typedef void(CLASSNAME::*AuraDispelFnType)(DispelInfo* dispelInfo); \

View file

@ -183,7 +183,6 @@ void CreatureTextMgr::LoadCreatureTextLocales()
continue;
ObjectMgr::AddLocaleString(Text, locale, data.Text);
} while (result->NextRow());
sLog->outString(">> Loaded %u Creature Text Locale in %u ms", uint32(mLocaleTextMap.size()), GetMSTimeDiffToNow(oldMSTime));

View file

@ -319,7 +319,6 @@ void TicketMgr::LoadTickets()
} while (result->NextRow());
sLog->outString(">> Loaded %u GM tickets in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
}
void TicketMgr::LoadSurveys()
@ -332,7 +331,6 @@ void TicketMgr::LoadSurveys()
_lastSurveyId = (*result)[0].GetUInt32();
sLog->outString(">> Loaded GM Survey count from database in %u ms", GetMSTimeDiffToNow(oldMSTime));
}
void TicketMgr::AddTicket(GmTicket* ticket)

View file

@ -128,7 +128,6 @@ struct keyData
void WardenMac::HandleHashResult(ByteBuffer& buff)
{
// test
int keyIn[4];

Some files were not shown because too many files have changed in this diff Show more