diff options
Diffstat (limited to 'src')
172 files changed, 1065 insertions, 1065 deletions
diff --git a/src/server/authserver/Main.cpp b/src/server/authserver/Main.cpp index addcc425211..49022059240 100644 --- a/src/server/authserver/Main.cpp +++ b/src/server/authserver/Main.cpp @@ -207,7 +207,7 @@ extern int main(int argc, char **argv) sLog.SetLogDBLater(sConfig.GetBoolDefault("EnableLogDB", false)); // set var to enable DB logging once startup finished. sLog.SetLogDB(false); sLog.SetRealmID(0); // ensure we've set realm to 0 (realmd realmid) - + ///- Get the list of realms for the server sRealmList->Initialize(sConfig.GetIntDefault("RealmsStateUpdateDelay", 20)); if (sRealmList->size() == 0) @@ -347,7 +347,7 @@ bool StartDB() return false; } LoginDatabase.ThreadStart(); - + uint32 count = 0; sPreparedStatement.LoadAuthserver(&LoginDatabase, count); sLog.outString("Loaded %u prepared MySQL statements for auth DB.", count); diff --git a/src/server/authserver/authserver.ico b/src/server/authserver/authserver.ico Binary files differindex da318f48a8c..6bcdbdf4f93 100644 --- a/src/server/authserver/authserver.ico +++ b/src/server/authserver/authserver.ico diff --git a/src/server/collision/BoundingIntervalHierarchy.h b/src/server/collision/BoundingIntervalHierarchy.h index 1e1955641cf..509eb3d2488 100644 --- a/src/server/collision/BoundingIntervalHierarchy.h +++ b/src/server/collision/BoundingIntervalHierarchy.h @@ -34,7 +34,7 @@ #define MAX_STACK_SIZE 64 #ifdef _MSC_VER - #define isnan(x) _isnan(x) + #define isnan(x) _isnan(x) #endif using G3D::Vector3; diff --git a/src/server/collision/Maps/MapTree.cpp b/src/server/collision/Maps/MapTree.cpp index 4fce91920e9..79ec106a27a 100644 --- a/src/server/collision/Maps/MapTree.cpp +++ b/src/server/collision/Maps/MapTree.cpp @@ -154,7 +154,7 @@ namespace VMAP iTree.intersectRay(pRay, intersectionCallBack, distance, pStopAtFirstHit); if (intersectionCallBack.didHit()) pMaxDist = distance; - return intersectionCallBack.didHit(); + return intersectionCallBack.didHit(); } //========================================================= diff --git a/src/server/game/AI/CoreAI/CombatAI.cpp b/src/server/game/AI/CoreAI/CombatAI.cpp index 0d0ff17ffd7..0114eef9f27 100644 --- a/src/server/game/AI/CoreAI/CombatAI.cpp +++ b/src/server/game/AI/CoreAI/CombatAI.cpp @@ -304,7 +304,7 @@ VehicleAI::VehicleAI(Creature *c) : CreatureAI(c), m_vehicle(c->GetVehicleKit()) void VehicleAI::UpdateAI(const uint32 diff) { CheckConditions(diff); - + if (m_DoDismiss) { if (m_DismissTimer < diff) diff --git a/src/server/game/AI/CoreAI/PetAI.cpp b/src/server/game/AI/CoreAI/PetAI.cpp index 0eb8e024adb..d1cfb2866b2 100644 --- a/src/server/game/AI/CoreAI/PetAI.cpp +++ b/src/server/game/AI/CoreAI/PetAI.cpp @@ -479,6 +479,6 @@ bool PetAI::_CheckTargetCC(Unit *target) { if (me->GetOwnerGUID() && target->HasNegativeAuraWithInterruptFlag(AURA_INTERRUPT_FLAG_TAKE_DAMAGE, me->GetOwnerGUID())) return true; - + return false; } diff --git a/src/server/game/AI/EventAI/CreatureEventAI.cpp b/src/server/game/AI/EventAI/CreatureEventAI.cpp index 4d8f5f5398b..ad12b80f209 100644 --- a/src/server/game/AI/EventAI/CreatureEventAI.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAI.cpp @@ -1332,10 +1332,10 @@ void CreatureEventAI::ReceiveEmote(Player* pPlayer, uint32 text_emote) return; Condition cond; - cond.mConditionType = ConditionType((*itr).Event.receive_emote.condition); + cond.mConditionType = ConditionType((*itr).Event.receive_emote.condition); cond.mConditionValue1 = (*itr).Event.receive_emote.conditionValue1; cond.mConditionValue2 = (*itr).Event.receive_emote.conditionValue2; - + if (cond.Meets(pPlayer)) { sLog.outDebug("CreatureEventAI: ReceiveEmote CreatureEventAI: Condition ok, processing"); diff --git a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp index 9f10cae7409..cd283333114 100644 --- a/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp +++ b/src/server/game/AI/EventAI/CreatureEventAIMgr.cpp @@ -360,7 +360,7 @@ void CreatureEventAIMgr::LoadCreatureEventAI_Scripts() if (temp.receive_emote.condition) { Condition cond; - cond.mConditionType = ConditionType(temp.receive_emote.condition); + cond.mConditionType = ConditionType(temp.receive_emote.condition); cond.mConditionValue1 = temp.receive_emote.conditionValue1; cond.mConditionValue2 = temp.receive_emote.conditionValue2; if (!sConditionMgr.isConditionTypeValid(&cond)) diff --git a/src/server/game/Achievements/AchievementMgr.cpp b/src/server/game/Achievements/AchievementMgr.cpp index 24f041bb661..d4ab3b90d33 100644 --- a/src/server/game/Achievements/AchievementMgr.cpp +++ b/src/server/game/Achievements/AchievementMgr.cpp @@ -886,7 +886,7 @@ void AchievementMgr::UpdateAchievementCriteria(AchievementCriteriaTypes type, ui } ProgressType progressType; - if (!progress) + if (!progress) // 1st time. Start count. progressType = PROGRESS_SET; else if (progress->date < (nextDailyResetTime - 2 * DAY)) diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index 002abac3bc3..11918bff2ef 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -487,9 +487,9 @@ bool AuctionHouseObject::RemoveAuction(AuctionEntry *auction, uint32 item_templa sScriptMgr.OnAuctionRemove(this, auction); - // we need to delete the entry, it is not referenced any more - delete auction; - return wasInMap; + // we need to delete the entry, it is not referenced any more + delete auction; + return wasInMap; } void AuctionHouseObject::Update() diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.h b/src/server/game/AuctionHouse/AuctionHouseMgr.h index 322fb08360f..03a00f46da5 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.h +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.h @@ -120,7 +120,7 @@ class AuctionHouseMgr friend class ACE_Singleton<AuctionHouseMgr, ACE_Null_Mutex>; AuctionHouseMgr(); ~AuctionHouseMgr(); - + public: typedef UNORDERED_MAP<uint32, Item*> ItemMap; diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 0b511c22ab9..4e2170695bd 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -818,7 +818,7 @@ void Battleground::EndBattleground(uint32 winner) { if (IsRandom() || BattlegroundMgr::IsBGWeekend(GetTypeID())) UpdatePlayerScore(plr, SCORE_BONUS_HONOR, GetBonusHonorFromKill(loos_kills)); - } + } plr->SetHealth(plr->GetMaxHealth()); @@ -1657,7 +1657,7 @@ void Battleground::SendWarningToAll(int32 entry, ...) data << (uint64)0; data << (uint32)0; // 2.1.0 data << (uint32)1; - data << (uint8)0; + data << (uint8)0; data << (uint64)0; data << (uint32)(strlen(msg.c_str())+1); data << msg.c_str(); @@ -1754,7 +1754,7 @@ void Battleground::HandleKillPlayer(Player *player, Player *killer) } // to be able to remove insignia -- ONLY IN Battlegrounds - // give xp only in Battlegrounds + // give xp only in Battlegrounds if (!isArena()) { player->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); @@ -1909,7 +1909,7 @@ void Battleground::RewardXPAtKill(Player* plr, Player* victim) if (victim->getLevel() > gray_level && (!not_gray_member_with_max_level || not_gray_member_with_max_level->getLevel() < member->getLevel())) not_gray_member_with_max_level = member; - } + } if (member_with_max_level) { @@ -1964,5 +1964,5 @@ void Battleground::RewardXPAtKill(Player* plr, Player* victim) if (Pet* pet = plr->GetPet()) pet->GivePetXP(xp); - } + } } diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index 4ad67f03fa8..33e2b17a9ca 100644 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -264,7 +264,7 @@ enum BG_OBJECT_DMG_HIT_TYPE BG_OBJECT_DMG_HIT_TYPE_DAMAGED = 1, BG_OBJECT_DMG_HIT_TYPE_JUST_HIGH_DAMAGED = 2, BG_OBJECT_DMG_HIT_TYPE_HIGH_DAMAGED = 3, - BG_OBJECT_DMG_HIT_TYPE_JUST_DESTROYED = 4 + BG_OBJECT_DMG_HIT_TYPE_JUST_DESTROYED = 4 }; enum GroupJoinBattlegroundResult diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.h b/src/server/game/Battlegrounds/BattlegroundMgr.h index 538c509b217..a68ae71ed7d 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.h +++ b/src/server/game/Battlegrounds/BattlegroundMgr.h @@ -40,7 +40,7 @@ class BattlegroundMgr /* Construction */ friend class ACE_Singleton<BattlegroundMgr, ACE_Null_Mutex>; BattlegroundMgr(); - + public: ~BattlegroundMgr(); void Update(uint32 diff); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index 3b8bedfa8ba..206316402a4 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -402,7 +402,7 @@ void BattlegroundAB::_NodeDeOccupied(uint8 node) if (node >= BG_AB_DYNAMIC_NODES_COUNT) return; - //remove bonus honor aura trigger creature when node is lost + //remove bonus honor aura trigger creature when node is lost if(node < BG_AB_DYNAMIC_NODES_COUNT)//only dynamic nodes, no start points DelCreature(node+7);//NULL checks are in DelCreature! 0-6 spirit guides diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index b0cd6d87543..d428d323551 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -319,7 +319,7 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type) triggerSpawnID = AV_CPLACE_TRIGGER17; newFaction = 84; } - else if (creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_H_CAPTAIN][0]) + else if (creature->GetEntry() == BG_AV_CreatureInfo[AV_NPC_H_CAPTAIN][0]) { triggerSpawnID = AV_CPLACE_TRIGGER18; newFaction = 83; @@ -335,7 +335,7 @@ Creature* BattlegroundAV::AddAVCreature(uint16 cinfoid, uint16 type) { trigger->setFaction(newFaction); trigger->CastSpell(trigger, SPELL_HONORABLE_DEFENDER_25Y, false); - } + } } return creature; @@ -790,7 +790,7 @@ void BattlegroundAV::DePopulateNode(BG_AV_Nodes node) if (!IsTower(node) && m_BgCreatures[node]) DelCreature(node); - //remove bonus honor aura trigger creature when node is lost + //remove bonus honor aura trigger creature when node is lost if(node < BG_AV_NODES_MAX)//fail safe DelCreature(node + 302);//NULL checks are in DelCreature! 0-302 spirit guides } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h index 17dccce8125..cec778e770f 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.h @@ -612,7 +612,7 @@ enum BG_AV_CreaturePlace AV_CPLACE_TRIGGER13 = 314, AV_CPLACE_TRIGGER14 = 315, AV_CPLACE_TRIGGER15 = 316, - + //boss,captain triggers AV_CPLACE_TRIGGER16 = 317, AV_CPLACE_TRIGGER17 = 318, diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp index 540e955eb85..fb888773be7 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp @@ -696,7 +696,7 @@ void BattlegroundEY::EventTeamLostPoint(Player *Source, uint32 Point) UpdatePointsIcons(Team, Point); UpdatePointsCount(Team); - //remove bonus honor aura trigger creature when node is lost + //remove bonus honor aura trigger creature when node is lost if (Point < EY_POINTS_MAX) DelCreature(Point + 6);//NULL checks are in DelCreature! 0-5 spirit guides } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index 577fbec184f..5b0b0b807d2 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -155,7 +155,7 @@ bool BattlegroundSA::ResetObjs() GetBGObject(i)->SetUInt32Value(GAMEOBJECT_FACTION, atF); } - for (uint8 i = BG_SA_PORTAL_DEFFENDER_BLUE; i < BG_SA_BOMB; i++) + for (uint8 i = BG_SA_PORTAL_DEFFENDER_BLUE; i < BG_SA_BOMB; i++) { AddObject(i, BG_SA_ObjEntries[i], BG_SA_ObjSpawnlocs[i][0], BG_SA_ObjSpawnlocs[i][1], @@ -260,7 +260,7 @@ void BattlegroundSA::Update(uint32 diff) InitSecondRound = false; SendMessageToAll(LANG_BG_SA_ROUND_TWO_ONE_MINUTE, CHAT_MSG_BG_SYSTEM_NEUTRAL); } - }else + }else { UpdateWaitTimer -= diff; return; @@ -277,7 +277,7 @@ void BattlegroundSA::Update(uint32 diff) TotalTime = 0; ToggleTimer(); DemolisherStartState(false); - status = BG_SA_ROUND_ONE; + status = BG_SA_ROUND_ONE; } if (TotalTime >= BG_SA_BOAT_START) StartShips(); @@ -287,7 +287,7 @@ void BattlegroundSA::Update(uint32 diff) { if (RoundScores[0].time<BG_SA_ROUNDLENGTH) BG_SA_ENDROUNDTIME = RoundScores[0].time; - else + else BG_SA_ENDROUNDTIME = BG_SA_ROUNDLENGTH; if (TotalTime >= 60000) @@ -319,7 +319,7 @@ void BattlegroundSA::Update(uint32 diff) RoundScores[0].time = BG_SA_ROUNDLENGTH; TotalTime = 0; status = BG_SA_SECOND_WARMUP; - attackers = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE; + attackers = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE; UpdateWaitTimer = 5000; SignaledRoundTwo = false; SignaledRoundTwoHalfMin = false; @@ -511,7 +511,7 @@ void BattlegroundSA::EventPlayerDamagedGO(Player* plr, GameObject* go, uint8 hit GateStatus[i] = BG_SA_GATE_DAMAGED; uint32 uws = GetWorldStateFromGateID(i); if (uws) - UpdateWorldState(uws, GateStatus[i]); + UpdateWorldState(uws, GateStatus[i]); break; } case BG_OBJECT_DMG_HIT_TYPE_HIGH_DAMAGED: @@ -586,7 +586,7 @@ void BattlegroundSA::DestroyGate(Player* pl, GameObject* /*go*/, uint32 destroye GateStatus[i] = BG_SA_GATE_DESTROYED; uint32 uws = GetWorldStateFromGateID(i); if (uws) - UpdateWorldState(uws, GateStatus[i]); + UpdateWorldState(uws, GateStatus[i]); bool rewardHonor = true; switch(i) { diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp index 10912ab4882..d1001db5ccb 100644 --- a/src/server/game/Chat/Channels/Channel.cpp +++ b/src/server/game/Chat/Channels/Channel.cpp @@ -711,7 +711,7 @@ void Channel::Invite(uint64 p, const char *newname) SendToOne(&data, p); return; } - + Player *plr = sObjectMgr.GetPlayer(p); if (!plr) return; diff --git a/src/server/game/Chat/Commands/Level3.cpp b/src/server/game/Chat/Commands/Level3.cpp index 89cb9526867..c2ff7d19ec4 100644 --- a/src/server/game/Chat/Commands/Level3.cpp +++ b/src/server/game/Chat/Commands/Level3.cpp @@ -274,7 +274,7 @@ bool ChatHandler::HandleReloadCreatureTemplateCommand(const char* args) { if (!*args) return false; - + uint32 entry = (uint32) atoi((char*)args); QueryResult_AutoPtr result = WorldDatabase.PQuery("SELECT difficulty_entry_1,difficulty_entry_2,difficulty_entry_3,KillCredit1,KillCredit2,modelid1,modelid2,modelid3,modelid4,name,subname,IconName,gossip_menu_id,minlevel,maxlevel,exp,faction_A,faction_H,npcflag,speed_walk,speed_run,scale,rank,mindmg,maxdmg,dmgschool,attackpower,dmg_multiplier,baseattacktime,rangeattacktime,unit_class,unit_flags,dynamicflags,family,trainer_type,trainer_spell,trainer_class,trainer_race,minrangedmg,maxrangedmg,rangedattackpower,type,type_flags,lootid,pickpocketloot,skinloot,resistance1,resistance2,resistance3,resistance4,resistance5,resistance6,spell1,spell2,spell3,spell4,spell5,spell6,spell7,spell8,PetSpellDataId,VehicleId,mingold,maxgold,AIName,MovementType,InhabitType,Health_mod,Mana_mod,Armor_mod,RacialLeader,questItem1,questItem2,questItem3,questItem4,questItem5,questItem6,movementId,RegenHealth,equipment_id,mechanic_immune_mask,flags_extra,ScriptName FROM creature_template WHERE entry = %u", entry); if (!result) @@ -283,7 +283,7 @@ bool ChatHandler::HandleReloadCreatureTemplateCommand(const char* args) SetSentErrorMessage(true); return false; } - + CreatureInfo const* cInfo = sCreatureStorage.LookupEntry<CreatureInfo>(entry); if (!cInfo) { diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp index a152ff96f89..2a064a1dad1 100644 --- a/src/server/game/Combat/ThreatManager.cpp +++ b/src/server/game/Combat/ThreatManager.cpp @@ -256,7 +256,7 @@ void ThreatContainer::modifyThreatPercent(Unit *pVictim, int32 iPercent) void ThreatContainer::update() { if (iDirty && iThreatList.size() >1) - { + { iThreatList.sort(Trinity::ThreatOrderPred()); } iDirty = false; diff --git a/src/server/game/Combat/ThreatManager.h b/src/server/game/Combat/ThreatManager.h index 2903fe83c38..5bc364fab19 100644 --- a/src/server/game/Combat/ThreatManager.h +++ b/src/server/game/Combat/ThreatManager.h @@ -268,8 +268,8 @@ namespace Trinity public: ThreatOrderPred(bool ascending = false) : m_ascending(ascending) {} bool operator() (const HostileReference *a, const HostileReference *b) const - { - return m_ascending ? a->getThreat() < b->getThreat() : a->getThreat() > b->getThreat(); + { + return m_ascending ? a->getThreat() < b->getThreat() : a->getThreat() > b->getThreat(); } private: const bool m_ascending; diff --git a/src/server/game/Conditions/ConditionMgr.h b/src/server/game/Conditions/ConditionMgr.h index aec59b32da1..cdb343fbe48 100644 --- a/src/server/game/Conditions/ConditionMgr.h +++ b/src/server/game/Conditions/ConditionMgr.h @@ -127,7 +127,7 @@ class ConditionMgr friend class ACE_Singleton<ConditionMgr, ACE_Null_Mutex>; ConditionMgr(); ~ConditionMgr(); - + public: void LoadConditions(bool isReload = false); diff --git a/src/server/game/DataStores/DBCStructure.h b/src/server/game/DataStores/DBCStructure.h index 3fc847bb2c6..5fbe10b12e9 100644 --- a/src/server/game/DataStores/DBCStructure.h +++ b/src/server/game/DataStores/DBCStructure.h @@ -1105,7 +1105,7 @@ struct LFGDungeonEntry //char* name[16]; // 1-17 Name lang uint32 minlevel; // 18 uint32 maxlevel; // 19 - uint32 reclevel; // 20 + uint32 reclevel; // 20 uint32 recminlevel; // 21 uint32 recmaxlevel; // 22 int32 map; // 23 diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index c096aaaa9ca..bf1b77edc36 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -1265,7 +1265,7 @@ bool Creature::LoadFromDB(uint32 guid, Map *map) } uint32 curhealth; - + if (!m_regenHealth) { curhealth = data->curhealth; @@ -1609,7 +1609,7 @@ void Creature::Respawn(bool force) uint16 poolid = GetDBTableGUIDLow() ? sPoolMgr.IsPartOfAPool<Creature>(GetDBTableGUIDLow()) : 0; if (poolid) sPoolMgr.UpdatePool<Creature>(poolid, GetDBTableGUIDLow()); - + //Re-initialize reactstate that could be altered by movementgenerators InitializeReactState(); } diff --git a/src/server/game/Entities/Creature/Creature.h b/src/server/game/Entities/Creature/Creature.h index 142af96f98c..74370c4d01f 100644 --- a/src/server/game/Entities/Creature/Creature.h +++ b/src/server/game/Entities/Creature/Creature.h @@ -427,7 +427,7 @@ class Creature : public Unit, public GridObject<Creature> bool canWalk() const { return GetCreatureInfo()->InhabitType & INHABIT_GROUND; } bool canSwim() const { return GetCreatureInfo()->InhabitType & INHABIT_WATER; } //bool canFly() const { return GetCreatureInfo()->InhabitType & INHABIT_AIR; } - + void SetReactState(ReactStates st) { m_reactState = st; } ReactStates GetReactState() { return m_reactState; } bool HasReactState(ReactStates state) const { return (m_reactState == state); } diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index 7e080670e90..ef7ac10634a 100644 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -1071,7 +1071,7 @@ bool Item::IsBindedNotWith(Player const* player) const // BOA item case if (IsBoundAccountWide()) return false; - + return true; } diff --git a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp index 6f8ff28cd21..58fa6f87d19 100644 --- a/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp +++ b/src/server/game/Entities/Item/ItemEnchantmentMgr.cpp @@ -93,8 +93,8 @@ uint32 GetItemEnchantMod(int32 entry) if (entry == -1) return 0; - - EnchantmentStore::const_iterator tab = RandomItemEnch.find(entry); + + EnchantmentStore::const_iterator tab = RandomItemEnch.find(entry); if (tab == RandomItemEnch.end()) { sLog.outErrorDb("Item RandomProperty / RandomSuffix id #%u used in `item_template` but it does not have records in `item_enchantment_template` table.",entry); diff --git a/src/server/game/Entities/Object/Object.h b/src/server/game/Entities/Object/Object.h index d148787aa28..bd417ea9c09 100644 --- a/src/server/game/Entities/Object/Object.h +++ b/src/server/game/Entities/Object/Object.h @@ -418,11 +418,11 @@ struct Position Position::PositionXYZStreamer PositionXYZStream() { - return Position::PositionXYZStreamer(*this); + return Position::PositionXYZStreamer(*this); } Position::PositionXYZOStreamer PositionXYZOStream() { - return Position::PositionXYZOStreamer(*this); + return Position::PositionXYZOStreamer(*this); } bool IsPositionValid() const; @@ -808,7 +808,7 @@ namespace Trinity _list.erase(itr); } } - + // Binary predicate to sort WorldObjects based on the distance to a reference WorldObject class ObjectDistanceOrderPred { diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 7b1e6afb91f..93caebab6f6 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -4361,7 +4361,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC uint32 charDelete_method = sWorld.getConfig(CONFIG_CHARDELETE_METHOD); uint32 charDelete_minLvl = sWorld.getConfig(CONFIG_CHARDELETE_MIN_LEVEL); - // if we want to finally delete the character or the character does not meet the level requirement, + // if we want to finally delete the character or the character does not meet the level requirement, // we set it to mode CHAR_DELETE_REMOVE if (deleteFinally || Player::GetLevelFromDB(playerguid) < charDelete_minLvl) charDelete_method = CHAR_DELETE_REMOVE; @@ -4530,7 +4530,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC sLog.outError("Player::DeleteFromDB: Unsupported delete method: %u.", charDelete_method); } - if (updateRealmChars) + if (updateRealmChars) sWorld.UpdateRealmCharCount(accountId); } @@ -7877,7 +7877,7 @@ void Player::CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32 // Apply spell mods ApplySpellMod(pEnchant->spellid[s],SPELLMOD_CHANCE_OF_SUCCESS,chance); - + // Shiv has 100% chance to apply the poison if (FindCurrentSpellBySpellId(5938) && e_slot == TEMP_ENCHANTMENT_SLOT) chance = 100.0f; @@ -12207,7 +12207,7 @@ void Player::SplitItem(uint16 src, uint16 dst, uint32 count) { // change item amount before check (for unique max count check) pSrcItem->SetCount(pSrcItem->GetCount() - count); - + ItemPosCountVec dest; uint8 msg = CanStoreItem(dstbag, dstslot, dest, pNewItem, false); if (msg != EQUIP_ERR_OK) diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index dd63b231215..986d54450f5 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -840,7 +840,7 @@ struct AccessRequirement enum CharDeleteMethod { CHAR_DELETE_REMOVE = 0, // Completely remove from the database - CHAR_DELETE_UNLINK = 1 // The character gets unlinked from the account, + CHAR_DELETE_UNLINK = 1 // The character gets unlinked from the account, // the name gets freed up and appears as deleted ingame }; diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp index c30a18abbd7..1ee002780b9 100644 --- a/src/server/game/Entities/Transport/Transport.cpp +++ b/src/server/game/Entities/Transport/Transport.cpp @@ -250,7 +250,7 @@ bool Transport::GenerateWaypoints(uint32 pathid, std::set<uint32> &mapids) return false; TaxiPathNodeList const& path = sTaxiPathNodesByPath[pathid]; - + std::vector<keyFrame> keyFrames; int mapChange = 0; mapids.clear(); @@ -516,7 +516,7 @@ void Transport::TeleportTransport(uint32 newMapid, float x, float y, float z) UpdateForMap(oldMap); UpdateForMap(newMap); } - + for (std::set<TransportCreatureProto *>::const_iterator i = sMapMgr.m_TransportNPCMap[GetEntry()].begin(); i != sMapMgr.m_TransportNPCMap[GetEntry()].end(); ++i) { TransportCreatureProto *proto = (*i); @@ -660,7 +660,7 @@ uint32 Transport::AddNPCPassenger(uint32 tguid, uint32 entry, float x, float y, pCreature->Relocate( GetPositionX() + (x * cos(GetOrientation()) + y * sin(GetOrientation() + M_PI)), GetPositionY() + (y * cos(GetOrientation()) + x * sin(GetOrientation())), - z + GetPositionZ() , + z + GetPositionZ() , o + GetOrientation()); if(!pCreature->IsPositionValid()) diff --git a/src/server/game/Entities/Transport/Transport.h b/src/server/game/Entities/Transport/Transport.h index facfc308417..1bde8d2af67 100644 --- a/src/server/game/Entities/Transport/Transport.h +++ b/src/server/game/Entities/Transport/Transport.h @@ -64,7 +64,7 @@ class Transport : public GameObject struct WayPoint { WayPoint() : mapid(0), x(0), y(0), z(0), teleport(false), id(0) {} - WayPoint(uint32 _mapid, float _x, float _y, float _z, bool _teleport, uint32 _id = 0, + WayPoint(uint32 _mapid, float _x, float _y, float _z, bool _teleport, uint32 _id = 0, uint32 _arrivalEventID = 0, uint32 _departureEventID = 0) : mapid(_mapid), x(_x), y(_y), z(_z), teleport(_teleport), id(_id), arrivalEventID(_arrivalEventID), departureEventID(_departureEventID) diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index a021126225f..b56f5300635 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3617,7 +3617,7 @@ void Unit::_AddAura(UnitAura * aura, Unit * caster) { AuraEffect *existingEff = foundAura->GetEffect(i); AuraEffect *newEff = aura->GetEffect(i); - if (!existingEff || !newEff) + if (!existingEff || !newEff) continue; newEff->SetPeriodicTimer(existingEff->GetPeriodicTimer()); } @@ -4427,7 +4427,7 @@ void Unit::RemoveAllAuras() AuraApplicationMap::iterator aurAppIter; for (aurAppIter = m_appliedAuras.begin(); aurAppIter != m_appliedAuras.end();) _UnapplyAura(aurAppIter, AURA_REMOVE_BY_DEFAULT); - + AuraMap::iterator aurIter; for (aurIter = m_ownedAuras.begin(); aurIter != m_ownedAuras.end();) RemoveOwnedAura(aurIter); @@ -7738,7 +7738,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger } default: break; - } + } // if not handled by custom case, get triggered spell from dummySpell proto if (!triggered_spell_id) @@ -7914,7 +7914,7 @@ bool Unit::HandleAuraProc(Unit * pVictim, uint32 damage, Aura * triggeredByAura, int32 bp0 = (damage/12) * SpellMgr::CalculateSpellEffectAmount(dummySpell, 2)/100; CastCustomSpell(pVictim, 66922, &bp0, NULL, NULL, true); return true; - } + } } // but should not proc on non-critical Holy Shocks else if ((procSpell->SpellFamilyFlags[0] & 0x200000 || procSpell->SpellFamilyFlags[1] & 0x10000) && !(procEx & PROC_EX_CRITICAL_HIT)) @@ -9803,7 +9803,7 @@ int32 Unit::DealHeal(Unit *pVictim, uint32 addhealth, SpellEntry const *spellPro // calculate heal absorb and reduce healing CalcHealAbsorb(pVictim, spellProto, addhealth, absorb); int32 gain = 0; - + if (addhealth) gain = pVictim->ModifyHealth(int32(addhealth)); @@ -10572,7 +10572,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM // Mobs can't crit with spells. if (IS_CREATURE_GUID(GetGUID())) return false; - + // not critting spell if ((spellProto->AttributesEx2 & SPELL_ATTR_EX2_CANT_CRIT)) return false; diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index de919cccec2..8aee8a6bb04 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -691,7 +691,7 @@ enum MovementFlags2 MOVEMENTFLAG2_UNK8 = 0x00000080, MOVEMENTFLAG2_UNK9 = 0x00000100, MOVEMENTFLAG2_UNK10 = 0x00000200, - MOVEMENTFLAG2_INTERPOLATED_MOVEMENT = 0x00000400, + MOVEMENTFLAG2_INTERPOLATED_MOVEMENT = 0x00000400, MOVEMENTFLAG2_INTERPOLATED_TURNING = 0x00000800, MOVEMENTFLAG2_INTERPOLATED_PITCHING = 0x00001000, MOVEMENTFLAG2_UNK14 = 0x00002000, @@ -699,7 +699,7 @@ enum MovementFlags2 MOVEMENTFLAG2_UNK16 = 0x00008000, // player only? - MOVEMENTFLAG2_INTERPOLATED = + MOVEMENTFLAG2_INTERPOLATED = MOVEMENTFLAG2_INTERPOLATED_MOVEMENT | MOVEMENTFLAG2_INTERPOLATED_TURNING | MOVEMENTFLAG2_INTERPOLATED_PITCHING @@ -2108,7 +2108,7 @@ namespace Trinity public: PowerPctOrderPred(Powers power, bool ascending = true) : m_power(power), m_ascending(ascending) {} bool operator() (const Unit *a, const Unit *b) const - { + { float rA = a->GetMaxPower(m_power) ? float(a->GetPower(m_power)) / float(a->GetMaxPower(m_power)) : 0.0f; float rB = b->GetMaxPower(m_power) ? float(b->GetPower(m_power)) / float(b->GetMaxPower(m_power)) : 0.0f; return m_ascending ? rA < rB : rA > rB; @@ -2117,14 +2117,14 @@ namespace Trinity const Powers m_power; const bool m_ascending; }; - + // Binary predicate for sorting Units based on percent value of health class HealthPctOrderPred { public: HealthPctOrderPred(bool ascending = true) : m_ascending(ascending) {} bool operator() (const Unit *a, const Unit *b) const - { + { float rA = a->GetMaxHealth() ? float(a->GetHealth()) / float(a->GetMaxHealth()) : 0.0f; float rB = b->GetMaxHealth() ? float(b->GetHealth()) / float(b->GetMaxHealth()) : 0.0f; return m_ascending ? rA < rB : rA > rB; @@ -2150,14 +2150,14 @@ inline void Unit::SendMonsterMoveByPath(Path<Elem,Node> const& path, uint32 star data << uint32(((GetUnitMovementFlags() & MOVEMENTFLAG_LEVITATING) || isInFlight()) ? (SPLINEFLAG_FLYING|SPLINEFLAG_WALKING) : SPLINEFLAG_WALKING); data << uint32(traveltime); data << uint32(pathSize); - + for (uint32 i = start; i < end; ++i) { data << float(path[i].x); data << float(path[i].y); data << float(path[i].z); } - + SendMessageToSet(&data, true); } #endif diff --git a/src/server/game/Entities/Vehicle/Vehicle.cpp b/src/server/game/Entities/Vehicle/Vehicle.cpp index 2f6dfc2c98f..32d5da36518 100644 --- a/src/server/game/Entities/Vehicle/Vehicle.cpp +++ b/src/server/game/Entities/Vehicle/Vehicle.cpp @@ -39,7 +39,7 @@ Vehicle::Vehicle(Unit *unit, VehicleEntry const *vehInfo) : me(unit), m_vehicleI ++m_usableSeatNum; } } - + // HACKY WAY, We must found a more generic way to handle this // Set inmunities since db ones are rewritten with player's ones switch (GetVehicleInfo()->m_ID) diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 4d3b43a2fdf..abbd731c877 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -526,7 +526,7 @@ void ObjectMgr::CheckCreatureTemplate(CreatureInfo const* cInfo) ok2 = false; if (difficultyEntries[diff2].find(cInfo->Entry) != difficultyEntries[diff2].end()) { - sLog.outErrorDb("Creature (Entry: %u) is listed as `difficulty_entry_%u` of another creature, but itself lists %u in `difficulty_entry_%u`.", + sLog.outErrorDb("Creature (Entry: %u) is listed as `difficulty_entry_%u` of another creature, but itself lists %u in `difficulty_entry_%u`.", cInfo->Entry, diff2 + 1, cInfo->DifficultyEntry[diff], diff + 1); continue; } @@ -2284,12 +2284,12 @@ void ObjectMgr::LoadItemPrototypes() // To be implemented later if (proto->RandomProperty == -1) const_cast<ItemPrototype*>(proto)->RandomProperty = 0; - + else if (!sItemRandomPropertiesStore.LookupEntry(GetItemEnchantMod(proto->RandomProperty))) { sLog.outErrorDb("Item (Entry: %u) has unknown (wrong or not listed in `item_enchantment_template`) RandomProperty (%u)",i,proto->RandomProperty); const_cast<ItemPrototype*>(proto)->RandomProperty = 0; - } + } } if (proto->RandomSuffix && !sItemRandomSuffixStore.LookupEntry(GetItemEnchantMod(proto->RandomSuffix))) @@ -2716,7 +2716,7 @@ void ObjectMgr::PlayerCreateInfoAddItemHelper(uint32 race_, uint32 class_, uint3 if (!found) sLog.outErrorDb("Item %u specified to be removed from original create info not found in dbc!", itemId); - + if (!doneOne) doneOne = true; else @@ -3585,7 +3585,7 @@ void ObjectMgr::LoadGroups() { bar2.step(); fields = result->Fetch(); - + if (groupLowGuid != fields[0].GetUInt32()) { groupLowGuid = fields[0].GetUInt32(); @@ -4761,7 +4761,7 @@ void ObjectMgr::LoadScripts(ScriptMapMap& scripts, char const* tablename) tablename, tmp.datalong2, tmp.id); continue; } - break; + break; } } @@ -8439,7 +8439,7 @@ void ObjectMgr::LoadGossipMenu() GossipMenus gMenu; gMenu.entry = fields[0].GetUInt32(); - gMenu.text_id = fields[1].GetUInt32(); + gMenu.text_id = fields[1].GetUInt32(); if (!GetGossipText(gMenu.text_id)) { diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index 1c910a7050f..9abe783b5b3 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -360,7 +360,7 @@ class ObjectMgr friend class ACE_Singleton<ObjectMgr, ACE_Null_Mutex>; ObjectMgr(); ~ObjectMgr(); - + public: typedef UNORDERED_MAP<uint32, Item*> ItemMap; diff --git a/src/server/game/Grids/Notifiers/GridNotifiers.h b/src/server/game/Grids/Notifiers/GridNotifiers.h index 77a8d8ae300..c2f5d9bfe59 100644 --- a/src/server/game/Grids/Notifiers/GridNotifiers.h +++ b/src/server/game/Grids/Notifiers/GridNotifiers.h @@ -1203,7 +1203,7 @@ namespace Trinity class GameObjectInRangeCheck { public: - GameObjectInRangeCheck(float _x, float _y, float _z, float _range, uint32 _entry = 0) : + GameObjectInRangeCheck(float _x, float _y, float _z, float _range, uint32 _entry = 0) : x(_x), y(_y), z(_z), range(_range), entry(_entry) {} bool operator() (GameObject* go) { diff --git a/src/server/game/Groups/Group.cpp b/src/server/game/Groups/Group.cpp index d13fed7eebc..6fda33ee124 100644 --- a/src/server/game/Groups/Group.cpp +++ b/src/server/game/Groups/Group.cpp @@ -1461,7 +1461,7 @@ void Group::ChangeMembersGroup(Player *player, const uint8 &group) { if (!player || !isRaidGroup()) return; - + uint8 prevSubGroup = player->GetSubGroup(); if (prevSubGroup == group) return; @@ -1773,12 +1773,12 @@ InstanceGroupBind* Group::GetBoundInstance(MapEntry const* mapEntry) { if (!mapEntry) return NULL; - + Difficulty difficulty = GetDifficulty(mapEntry->IsRaid()); - + // some instances only have one difficulty MapDifficulty const* mapDiff = GetDownscaledMapDifficultyData(mapEntry->MapID,difficulty); - + BoundInstancesMap::iterator itr = m_boundInstances[difficulty].find(mapEntry->MapID); if (itr != m_boundInstances[difficulty].end()) return &itr->second; diff --git a/src/server/game/Instances/InstanceSaveMgr.h b/src/server/game/Instances/InstanceSaveMgr.h index 7cecc4d9f75..3d3d7ab5a21 100644 --- a/src/server/game/Instances/InstanceSaveMgr.h +++ b/src/server/game/Instances/InstanceSaveMgr.h @@ -122,9 +122,9 @@ class InstanceSaveManager friend class ACE_Singleton<InstanceSaveManager, ACE_Null_Mutex>; friend class InstanceSave; public: - InstanceSaveManager() : lock_instLists(false) {}; + InstanceSaveManager() : lock_instLists(false) {}; ~InstanceSaveManager(); - + typedef UNORDERED_MAP<uint32 /*InstanceId*/, InstanceSave*> InstanceSaveHashMap; typedef UNORDERED_MAP<uint32 /*mapId*/, InstanceSaveHashMap> InstanceSaveMapMap; @@ -177,7 +177,7 @@ class InstanceSaveManager uint32 GetNumBoundGroupsTotal(); private: - + void _ResetOrWarnAll(uint32 mapid, Difficulty difficulty, bool warn, uint32 timeleft); void _ResetInstance(uint32 mapid, uint32 instanceId); void _ResetSave(InstanceSaveHashMap::iterator &itr); diff --git a/src/server/game/Loot/LootMgr.cpp b/src/server/game/Loot/LootMgr.cpp index 1cd2e1d939d..86f078a7340 100644 --- a/src/server/game/Loot/LootMgr.cpp +++ b/src/server/game/Loot/LootMgr.cpp @@ -326,9 +326,9 @@ bool LootStoreItem::IsValid(LootStore const& store, uint32 entry) const // Constructor, copies most fields from LootStoreItem and generates random count LootItem::LootItem(LootStoreItem const& li) { - itemid = li.itemid; + itemid = li.itemid; conditions = li.conditions; - + ItemPrototype const* proto = sObjectMgr.GetItemPrototype(itemid); freeforall = proto && (proto->Flags & ITEM_PROTO_FLAG_PARTY_LOOT); @@ -392,7 +392,7 @@ void Loot::AddItem(LootStoreItem const & item) { if (quest_items.size() < MAX_NR_QUEST_ITEMS) quest_items.push_back(LootItem(item)); - } + } else if (items.size() < MAX_NR_LOOT_ITEMS) // Non-quest drop { items.push_back(LootItem(item)); @@ -1342,7 +1342,7 @@ bool LootTemplate::addConditionItem(Condition* cond) { if ((*i).itemid == cond->mSourceEntry) { - (*i).conditions.push_back(cond); + (*i).conditions.push_back(cond); return true; } } diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index 069ea97ab10..e5d6e36d269 100644 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -2749,9 +2749,9 @@ inline Player* Map::_GetScriptPlayerSourceOrTarget(Object* source, Object* targe pPlayer = source->ToPlayer(); if (!pPlayer) - sLog.outError("%s (script id: %u) neither source nor target object is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog.outError("%s (script id: %u) neither source nor target object is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", sCommandName, unScriptID, - source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0, + source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0, target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUIDLow() : 0); } return pPlayer; @@ -2782,9 +2782,9 @@ inline Creature* Map::_GetScriptCreatureSourceOrTarget(Object* source, Object* t } if (!pCreature) - sLog.outError("%s (script id: %u) neither source nor target are creatures (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog.outError("%s (script id: %u) neither source nor target are creatures (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", sCommandName, unScriptID, - source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0, + source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0, target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUIDLow() : 0); } return pCreature; @@ -2868,13 +2868,13 @@ inline void Map::_ScriptProcessDoor(Object* source, Object* target, bool bOpen, if (!wSource) sLog.outError("%s (script id: %u) source object could not be casted to world object (TypeId: %u, Entry: %u, GUID: %u), skipping.", sCommandName, unScriptID, source->GetTypeId(), source->GetEntry(), source->GetGUIDLow()); - else + else { GameObject *pDoor = _FindGameObject(wSource, guid); if (!pDoor) sLog.outError("%s (script id: %u) gameobject was not found (guid: %u).", sCommandName, unScriptID, guid); else if (pDoor->GetGoType() != GAMEOBJECT_TYPE_DOOR) - sLog.outError("%s (script id: %u) gameobject is not a door (GoType: %u, Entry: %u, GUID: %u).", + sLog.outError("%s (script id: %u) gameobject is not a door (GoType: %u, Entry: %u, GUID: %u).", sCommandName, unScriptID, pDoor->GetGoType(), pDoor->GetEntry(), pDoor->GetGUIDLow()); else if (bOpen == (pDoor->GetGoState() == GO_STATE_READY)) { @@ -3120,7 +3120,7 @@ void Map::ScriptsProcess() cSource->NearTeleportTo(step.script->x, step.script->y, step.script->z, step.script->o); break; default: - sLog.outError("SCRIPT_COMMAND_TELEPORT_TO (script id: %u) unknown datalong2 flag (%u), skipping.", + sLog.outError("SCRIPT_COMMAND_TELEPORT_TO (script id: %u) unknown datalong2 flag (%u), skipping.", step.script->id, step.script->datalong2); } break; @@ -3142,7 +3142,7 @@ void Map::ScriptsProcess() if (WorldObject* pSummoner = _GetScriptWorldObject(source, true, step.script->id, "SCRIPT_COMMAND_TEMP_SUMMON_CREATURE")) { if (!step.script->datalong) - sLog.outError("SCRIPT_COMMAND_TEMP_SUMMON_CREATURE (script id: %u) creature entry (datalong) is not specified.", + sLog.outError("SCRIPT_COMMAND_TEMP_SUMMON_CREATURE (script id: %u) creature entry (datalong) is not specified.", step.script->id); else { @@ -3152,7 +3152,7 @@ void Map::ScriptsProcess() float o = step.script->o; if (pSummoner->SummonCreature(step.script->datalong, x, y, z, o, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, step.script->datalong2)) - sLog.outError("SCRIPT_COMMAND_TEMP_SUMMON (script id: %u) creature was not spawned (entry: %u).", + sLog.outError("SCRIPT_COMMAND_TEMP_SUMMON (script id: %u) creature was not spawned (entry: %u).", step.script->id, step.script->datalong); } } @@ -3172,7 +3172,7 @@ void Map::ScriptsProcess() GameObject *pGO = _FindGameObject(pSummoner, step.script->datalong); if (!pGO) { - sLog.outError("SCRIPT_COMMAND_RESPAWN_GAMEOBJECT (script id: %u) gameobject was not found (guid: %u).", + sLog.outError("SCRIPT_COMMAND_RESPAWN_GAMEOBJECT (script id: %u) gameobject was not found (guid: %u).", step.script->id, step.script->datalong); break; } @@ -3182,7 +3182,7 @@ void Map::ScriptsProcess() pGO->GetGoType() == GAMEOBJECT_TYPE_BUTTON || pGO->GetGoType() == GAMEOBJECT_TYPE_TRAP) { - sLog.outError("SCRIPT_COMMAND_RESPAWN_GAMEOBJECT (script id: %u) can not be used with gameobject of type %u (guid: %u).", + sLog.outError("SCRIPT_COMMAND_RESPAWN_GAMEOBJECT (script id: %u) can not be used with gameobject of type %u (guid: %u).", step.script->id, uint32(pGO->GetGoType()), step.script->datalong); break; } @@ -3245,15 +3245,15 @@ void Map::ScriptsProcess() } else { - sLog.outError("SCRIPT_COMMAND_QUEST_EXPLORED (script id %u) neither source nor target is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", + sLog.outError("SCRIPT_COMMAND_QUEST_EXPLORED (script id %u) neither source nor target is player (source: TypeId: %u, Entry: %u, GUID: %u; target: TypeId: %u, Entry: %u, GUID: %u), skipping.", step.script->id, - source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0, + source ? source->GetTypeId() : 0, source ? source->GetEntry() : 0, source ? source->GetGUIDLow() : 0, target ? target->GetTypeId() : 0, target ? target->GetEntry() : 0, target ? target->GetGUIDLow() : 0); break; } // quest id and flags checked at script loading - if ((worldObject->GetTypeId() != TYPEID_UNIT || ((Unit*)worldObject)->isAlive()) && + if ((worldObject->GetTypeId() != TYPEID_UNIT || ((Unit*)worldObject)->isAlive()) && (step.script->datalong2 == 0 || worldObject->IsWithinDistInMap(pTarget, float(step.script->datalong2)))) pTarget->AreaExploredOrEventHappens(step.script->datalong); else @@ -3479,7 +3479,7 @@ void Map::ScriptsProcess() if (Creature *cSource = _GetScriptCreatureSourceOrTarget(source, target, step.script->id, "SCRIPT_COMMAND_KILL")) { if (cSource->isDead()) - sLog.outError("SCRIPT_COMMAND_KILL (script id: %u) creature is already dead (Entry: %u, GUID: %u)", + sLog.outError("SCRIPT_COMMAND_KILL (script id: %u) creature is already dead (Entry: %u, GUID: %u)", step.script->id, cSource->GetEntry(), cSource->GetGUIDLow()); else { diff --git a/src/server/game/Miscellaneous/Formulas.h b/src/server/game/Miscellaneous/Formulas.h index 5d992d972d4..6e20d9e15f3 100644 --- a/src/server/game/Miscellaneous/Formulas.h +++ b/src/server/game/Miscellaneous/Formulas.h @@ -35,7 +35,7 @@ namespace Trinity sScriptMgr.OnHonorCalculation(honor, level, count); return honor; } - + inline uint32 hk_honor_at_level(uint8 level, uint32 count = 1) { uint32 honor = ceil(hk_honor_at_level_f(level, count)); diff --git a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp index 1ccc71d94fd..62f5f53ad96 100644 --- a/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp @@ -53,7 +53,7 @@ ConfusedMovementGenerator<T>::Initialize(T &unit) float wanderY = y + wander_distance*rand_norm() - wander_distance/2; Trinity::NormalizeMapCoord(wanderX); Trinity::NormalizeMapCoord(wanderY); - + float new_z = map->GetHeight(wanderX, wanderY, z, true); if (new_z > INVALID_HEIGHT && unit.IsWithinLOS(wanderX, wanderY, new_z)) { @@ -68,7 +68,7 @@ ConfusedMovementGenerator<T>::Initialize(T &unit) i_waypoints[idx][2] = idx > 0 ? i_waypoints[idx-1][2] : z; continue; } - + // Taken from FleeingMovementGenerator if (!(new_z - z) || wander_distance / fabs(new_z - z) > 1.0f) { diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp index a2217706a43..42c01f4401a 100644 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp @@ -292,7 +292,7 @@ bool FlightPathMovementGenerator::Update(Player &player, const uint32 &diff) // do not send movement, it was sent already i_destinationHolder.SetDestination(traveller, (*i_path)[i_currentNode].x, (*i_path)[i_currentNode].y, (*i_path)[i_currentNode].z, false); } - + // check if it's time to preload the flightmaster grid at path end if (i_currentNode == m_preloadTargetNode) PreloadEndGrid(); diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h index cce0eff290e..74bd1d02cdf 100644 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h @@ -54,7 +54,7 @@ class PathMovementBase void LoadPath(T &); void ReloadPath(T &); uint32 GetCurrentNode() const { return i_currentNode; } - + bool GetDestination(float& x, float& y, float& z) const { i_destinationHolder.GetDestination(x,y,z); return true; } bool GetPosition(float& x, float& y, float& z) const { i_destinationHolder.GetLocationNowNoMicroMovement(x,y,z); return true; } diff --git a/src/server/game/Movement/Waypoints/Path.h b/src/server/game/Movement/Waypoints/Path.h index de73d9270af..044a6134934 100644 --- a/src/server/game/Movement/Waypoints/Path.h +++ b/src/server/game/Movement/Waypoints/Path.h @@ -53,7 +53,7 @@ class Path } return len; } - + float GetTotalLength() const { return GetTotalLength(0,size()); } float GetPassedLength(uint32 curnode, float x, float y, float z) @@ -74,7 +74,7 @@ class Path PathNode& operator[](size_t idx) { return i_nodes[idx]; } PathNode const& operator[](size_t idx) const { return i_nodes[idx]; } - + void set(size_t idx, PathElem elem) { i_nodes[idx] = elem; } protected: diff --git a/src/server/game/Quests/QuestDef.h b/src/server/game/Quests/QuestDef.h index 28cd7ac5cd8..a5e1d3633eb 100644 --- a/src/server/game/Quests/QuestDef.h +++ b/src/server/game/Quests/QuestDef.h @@ -141,7 +141,7 @@ enum __QuestFlags QUEST_FLAGS_AUTOCOMPLETE = 0x00010000, // auto complete QUEST_FLAGS_SPECIAL_ITEM = 0x00020000, // has something to do with ReqItemId and SrcItemId QUEST_FLAGS_OBJ_TEXT = 0x00040000, // use Objective text as Complete text - QUEST_FLAGS_AUTO_ACCEPT = 0x00080000, // The client recognizes this flag as auto-accept. However, NONE of the current quests (3.3.5a) have this flag. Maybe blizz used to use it, or will use it in the future. + QUEST_FLAGS_AUTO_ACCEPT = 0x00080000, // The client recognizes this flag as auto-accept. However, NONE of the current quests (3.3.5a) have this flag. Maybe blizz used to use it, or will use it in the future. // Trinity flags for set SpecialFlags in DB if required but used only at server QUEST_TRINITY_FLAGS_REPEATABLE = 0x00100000, // Set by 1 in SpecialFlags from DB diff --git a/src/server/game/Reputation/ReputationMgr.cpp b/src/server/game/Reputation/ReputationMgr.cpp index bb6e82018f1..dbe3cd3833b 100644 --- a/src/server/game/Reputation/ReputationMgr.cpp +++ b/src/server/game/Reputation/ReputationMgr.cpp @@ -149,7 +149,7 @@ void ReputationMgr::SendState(FactionState const* faction) const size_t p_count = data.wpos(); data << (uint32) count; // placeholder - + data << (uint32) faction->ReputationListID; data << (uint32) faction->Standing; diff --git a/src/server/game/Scripting/ScriptMgr.h b/src/server/game/Scripting/ScriptMgr.h index f644cbd2adf..e2ba684ab6b 100644 --- a/src/server/game/Scripting/ScriptMgr.h +++ b/src/server/game/Scripting/ScriptMgr.h @@ -479,7 +479,7 @@ class CreatureScript : public ScriptObject, public UpdatableScript<Creature> public: 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; } @@ -524,25 +524,25 @@ class GameObjectScript : public ScriptObject, public UpdatableScript<GameObject> public: 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; } - + // Called when a player opens a gossip dialog with the gameobject. 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; } - + // 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; } - + // Called when a player accepts a quest from the gameobject. 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; } - + // Called when the dialog status between a player and the gameobject is requested. virtual uint32 GetDialogStatus(Player* player, GameObject* go) { return 0; } @@ -953,26 +953,26 @@ class ScriptMgr { // Counter used for code-only scripts. static uint32 _scriptIdCounter; - + public: - + typedef std::map<uint32, TScript*> ScriptMap; typedef typename ScriptMap::iterator ScriptMapIterator; - + // The actual list of scripts. This will be accessed concurrently, so it must not be modified // after server startup. static ScriptMap ScriptPointerList; - + // Gets a script by its ID (assigned by ObjectMgr). static TScript* GetScriptById(uint32 id) { ScriptMapIterator it = ScriptPointerList.find(id); if (it != ScriptPointerList.end()) return it->second; - + return NULL; } - + // Attempts to add a new script to the list. static void AddScript(TScript* const script); }; diff --git a/src/server/game/Server/Protocol/Handlers/AddonHandler.h b/src/server/game/Server/Protocol/Handlers/AddonHandler.h index 4a570abd760..f875e265abf 100644 --- a/src/server/game/Server/Protocol/Handlers/AddonHandler.h +++ b/src/server/game/Server/Protocol/Handlers/AddonHandler.h @@ -31,7 +31,7 @@ class AddonHandler /* Construction */ friend class ACE_Singleton<AddonHandler, ACE_Null_Mutex>; AddonHandler(); - + public: ~AddonHandler(); //build addon packet diff --git a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp index 84eb0fa0701..64a7355aa0e 100644 --- a/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/BattleGroundHandler.cpp @@ -146,7 +146,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket & recv_data) _player->GetSession()->SendPacket(&data); return; } - + if (_player->InBattlegroundQueue() && bgTypeId == BATTLEGROUND_RB) { //player is already in queue, can't start random queue diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp index 66b7bee40aa..634c0cd1136 100644 --- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp @@ -471,7 +471,7 @@ void WorldSession::HandleCharCreateOpcode(WorldPacket & recv_data) LoginDatabase.PExecute("INSERT INTO realmcharacters (numchars, acctid, realmid) VALUES (%u, %u, %u)", charcount, GetAccountId(), realmID); pNewChar->CleanupsBeforeDelete(); - + data << (uint8)CHAR_CREATE_SUCCESS; SendPacket(&data); diff --git a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp b/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp index 0025ed86af7..26f7d81a596 100644 --- a/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/GroupHandler.cpp @@ -546,7 +546,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data) uint8 groupNr; recv_data >> name; recv_data >> groupNr; - + if (groupNr >= MAX_RAID_SUBGROUPS) return; @@ -561,7 +561,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode(WorldPacket & recv_data) Player *movedPlayer = sObjectMgr.GetPlayer(name.c_str()); if (movedPlayer) - { + { //Do not allow leader to change group of player in combat if (movedPlayer->isInCombat()) return; diff --git a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp index c46f2128cc9..6e36c963277 100644 --- a/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/NPCHandler.cpp @@ -38,7 +38,7 @@ #include "Guild.h" #include "ScriptMgr.h" -enum StableResultCode +enum StableResultCode { STABLE_ERR_MONEY = 0x01, // "you don't have enough money" STABLE_ERR_STABLE = 0x06, // currently used in most fail cases diff --git a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp index c8208e68e16..24413abaebd 100644 --- a/src/server/game/Server/Protocol/Handlers/PetHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/PetHandler.cpp @@ -416,7 +416,7 @@ bool WorldSession::CheckStableMaster(uint64 guid) if (guid == GetPlayer()->GetGUID()) { if (!GetPlayer()->isGameMaster() && !GetPlayer()->HasAuraType(SPELL_AURA_OPEN_STABLE)) - { + { DEBUG_LOG("Player (GUID:%u) attempt open stable in cheating way.", GUID_LOPART(guid)); return false; } diff --git a/src/server/game/Server/WorldSession.cpp b/src/server/game/Server/WorldSession.cpp index 47a35a62b0d..39d853e716d 100644 --- a/src/server/game/Server/WorldSession.cpp +++ b/src/server/game/Server/WorldSession.cpp @@ -174,12 +174,12 @@ bool WorldSession::Update(uint32 diff) { /// Update Timeout timer. UpdateTimeOutTime(diff); - - ///- Before we process anything: + + ///- Before we process anything: /// If necessary, kick the player from the character select screen if (IsConnectionIdle()) m_Socket->CloseSocket(); - + ///- Retrieve packets from the receive queue and call the appropriate handlers /// not proccess packets if socket already closed WorldPacket* packet; @@ -261,7 +261,7 @@ bool WorldSession::Update(uint32 diff) // and before other STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT opcodes. if (packet->GetOpcode() != CMSG_SET_ACTIVE_VOICE_CHANNEL) m_playerRecentlyLogout = false; - + sScriptMgr.OnPacketReceive(m_Socket, WorldPacket(*packet)); (this->*opHandle.handler)(*packet); if (sLog.IsOutDebug() && packet->rpos() < packet->wpos()) diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index 5b179288b4c..09d2199b3ff 100644 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -114,7 +114,7 @@ m_OverSpeedPings(0), m_LastPingTime(ACE_Time_Value::zero) { reference_counting_policy().value (ACE_Event_Handler::Reference_Counting_Policy::ENABLED); - + msg_queue()->high_water_mark(8*1024*1024); msg_queue()->low_water_mark(8*1024*1024); } @@ -265,7 +265,7 @@ int WorldSocket::open (void *a) } m_Address = remote_addr.get_host_addr(); - + // Send startup packet. WorldPacket packet (SMSG_AUTH_CHALLENGE, 24); packet << uint32(1); // 1...31 @@ -281,14 +281,14 @@ int WorldSocket::open (void *a) if (SendPacket(packet) == -1) return -1; - + // Register with ACE Reactor if (reactor()->register_handler(this, ACE_Event_Handler::READ_MASK | ACE_Event_Handler::WRITE_MASK) == -1) { sLog.outError ("WorldSocket::open: unable to register client handler errno = %s", ACE_OS::strerror (errno)); return -1; } - + // reactor takes care of the socket from now on remove_reference(); @@ -721,7 +721,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct) sLog.outError ("WorldSocket::ProcessIncoming: Player send CMSG_AUTH_SESSION again"); return -1; } - + sScriptMgr.OnPacketReceive(this, WorldPacket(*new_pct)); return HandleAuthSession (*new_pct); case CMSG_KEEP_ALIVE: @@ -737,7 +737,7 @@ int WorldSocket::ProcessIncoming (WorldPacket* new_pct) // Our Idle timer will reset on any non PING opcodes. // Catches people idling on the login screen and any lingering ingame connections. m_Session->ResetTimeOutTime(); - + // OK ,give the packet to WorldSession aptr.release(); // WARNINIG here we call it with locks held. @@ -997,7 +997,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket) m_Session->LoadTutorialsData(); m_Session->ReadAddonsInfo(recvPacket); - // Sleep this Network thread for + // Sleep this Network thread for uint32 sleepTime = sWorld.getConfig(CONFIG_SESSION_ADD_DELAY); ACE_OS::sleep (ACE_Time_Value (0, sleepTime)); diff --git a/src/server/game/Server/WorldSocket.h b/src/server/game/Server/WorldSocket.h index d07e9a3f2e4..eb73471a61a 100644 --- a/src/server/game/Server/WorldSocket.h +++ b/src/server/game/Server/WorldSocket.h @@ -157,7 +157,7 @@ class WorldSocket : protected WorldHandler /// @param g the guard is for m_OutBufferLock, the function will release it int cancel_wakeup_output (GuardType& g); int schedule_wakeup_output (GuardType& g); - + /// Drain the queue if its not empty. int handle_output_queue (GuardType& g); diff --git a/src/server/game/Server/WorldSocketMgr.cpp b/src/server/game/Server/WorldSocketMgr.cpp index d4015c47e76..9a50456919f 100644 --- a/src/server/game/Server/WorldSocketMgr.cpp +++ b/src/server/game/Server/WorldSocketMgr.cpp @@ -250,7 +250,7 @@ WorldSocketMgr::StartReactiveIO (ACE_UINT16 port, const char* address) m_NetThreads = new ReactorRunnable[m_NetThreadsCount]; sLog.outBasic ("Max allowed socket connections %d", ACE::max_handles()); - + // -1 means use default m_SockOutKBuff = sConfig.GetIntDefault ("Network.OutKBuff", -1); diff --git a/src/server/game/Server/WorldSocketMgr.h b/src/server/game/Server/WorldSocketMgr.h index 11345304962..e1d7cd6a19a 100644 --- a/src/server/game/Server/WorldSocketMgr.h +++ b/src/server/game/Server/WorldSocketMgr.h @@ -53,7 +53,7 @@ public: /// Make this class singleton . static WorldSocketMgr* Instance(); - + private: int OnSocketOpen(WorldSocket* sock); diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp index c3988672113..3ac1fef62c9 100644 --- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp +++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp @@ -1498,7 +1498,7 @@ void AuraEffect::PeriodicTick(Unit * target, Unit * caster) const float maxval = target->GetMaxPositiveAuraModifier(SPELL_AURA_MOD_HEALING_PCT); if (maxval) TakenTotalMod *= (100.0f + maxval) / 100.0f; - + // Healing over time taken percent float minval_hot = target->GetMaxNegativeAuraModifier(SPELL_AURA_MOD_HOT_PCT); if (minval_hot) @@ -6287,5 +6287,5 @@ void AuraEffect::HandleAuraOpenStable(AuraApplication const * aurApp, uint8 mode if (apply) target->ToPlayer()->GetSession()->SendStablePet(target->GetGUID()); - // client auto close stable dialog at !apply aura + // client auto close stable dialog at !apply aura } diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index e0a41766fbd..dcd3d36e043 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -482,8 +482,8 @@ void Aura::UpdateTargetMap(Unit * caster, bool apply) for (std::map<Unit *, uint8>::iterator itr = targets.begin(); itr!= targets.end();) { bool addUnit = true; - // check target immunities - if (itr->first->IsImmunedToSpell(GetSpellProto()) + // check target immunities + if (itr->first->IsImmunedToSpell(GetSpellProto()) || !CanBeAppliedOn(itr->first)) addUnit = false; diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 05c6c741e39..a3075b6fe9c 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -819,7 +819,7 @@ void Spell::prepareDataForTriggerSystem(AuraEffect const * /*triggeredByAura*/) } break; } - case SPELLFAMILY_WARLOCK: + case SPELLFAMILY_WARLOCK: { // For Hellfire Effect / Rain of Fire - trigger as DOT if (m_spellInfo->SpellFamilyFlags[0] & 0x60) @@ -1740,7 +1740,7 @@ void Spell::SearchAreaTarget(std::list<Unit*> &TagUnitMap, float radius, SpellNo { if (TargetType == SPELL_TARGETS_GO) return; - + Position *pos; switch(type) { @@ -2658,7 +2658,7 @@ void Spell::SelectEffectTargets(uint32 i, uint32 cur) } } } - + // Other special target selection goes here if (uint32 maxTargets = m_spellValue->MaxAffectedTargets) { @@ -5273,7 +5273,7 @@ SpellCastResult Spell::CheckCast(bool strict) (!pTempItem || !pTempItem->GetProto()->LockID || !pTempItem->IsLocked())) return SPELL_FAILED_BAD_TARGETS; - if (m_spellInfo->Id != 1842 || m_targets.getGOTarget() && + if (m_spellInfo->Id != 1842 || m_targets.getGOTarget() && m_targets.getGOTarget()->GetGOInfo()->type != GAMEOBJECT_TYPE_TRAP) if (m_caster->ToPlayer()->InBattleground() && // In Battleground players can use only flags and banners !m_caster->ToPlayer()->CanUseBattlegroundObject()) diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index cb9e8312466..0405b8a8a33 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -219,7 +219,7 @@ pEffect SpellEffects[TOTAL_SPELL_EFFECTS]= &Spell::EffectTriggerRitualOfSummoning, //151 SPELL_EFFECT_TRIGGER_SPELL_2 &Spell::EffectNULL, //152 SPELL_EFFECT_152 summon Refer-a-Friend &Spell::EffectCreateTamedPet, //153 SPELL_EFFECT_CREATE_TAMED_PET misc value is creature entry - &Spell::EffectDiscoverTaxi, //154 SPELL_EFFECT_DISCOVER_TAXI + &Spell::EffectDiscoverTaxi, //154 SPELL_EFFECT_DISCOVER_TAXI &Spell::EffectTitanGrip, //155 SPELL_EFFECT_TITAN_GRIP Allows you to equip two-handed axes, maces and swords in one hand, but you attack $49152s1% slower than normal. &Spell::EffectEnchantItemPrismatic, //156 SPELL_EFFECT_ENCHANT_ITEM_PRISMATIC &Spell::EffectCreateItem2, //157 SPELL_EFFECT_CREATE_ITEM_2 create item or create item template and replace by some randon spell loot item @@ -431,7 +431,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx) damage = (m_caster->getLevel() - 60) * 4 + 60; break; } - + // Loken Pulsing Shockwave case 59837: case 52942: @@ -439,7 +439,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx) // don't damage self and only players if(unitTarget->GetGUID() == m_caster->GetGUID() || unitTarget->GetTypeId() != TYPEID_PLAYER) return; - + float radius = GetSpellRadiusForHostile(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[0])); if (!radius) return; @@ -929,15 +929,15 @@ void Spell::EffectDummy(uint32 i) return; } case 14537: // Six Demon Bag - { - if( !unitTarget || !unitTarget->isAlive()) return; - - uint32 ClearSpellId[6] = - { - 15662, // Fireball - 11538, // Frostball - 21179, // Chain Lightning - 14621, // Polymorph + { + if( !unitTarget || !unitTarget->isAlive()) return; + + uint32 ClearSpellId[6] = + { + 15662, // Fireball + 11538, // Frostball + 21179, // Chain Lightning + 14621, // Polymorph 25189, // Enveloping Winds 14642 // Summon Felhund minion }; @@ -956,7 +956,7 @@ void Spell::EffectDummy(uint32 i) effect = ClearSpellId[3]; if (urand(0, 100) <= 30) // 30% chance to self-cast unitTarget = m_caster; - } + } else if (rand >=80 && rand < 95) // Enveloping Winds (15% chance) effect = ClearSpellId[4]; else // Summon Felhund minion (5% chance) @@ -966,7 +966,7 @@ void Spell::EffectDummy(uint32 i) } m_caster->CastSpell(unitTarget, effect, true); - return; + return; } case 16589: // Noggenfogger Elixir { @@ -1553,7 +1553,7 @@ void Spell::EffectDummy(uint32 i) switch (m_spellInfo->Id) { case 11689: spFactor = 0.2; break; - case 27222: + case 27222: case 57946: spFactor = 0.5; break; default: spFactor = 0; break; } @@ -2297,7 +2297,7 @@ void Spell::EffectTeleportUnits(uint32 /*i*/) case 60321: // Scroll of Recal III if (!uiMaxSafeLevel) uiMaxSafeLevel = 80; - + if (unitTarget->getLevel() > uiMaxSafeLevel) { unitTarget->AddAura(60444,unitTarget); //Apply Lost! Aura @@ -6714,7 +6714,7 @@ void Spell::EffectKnockBack(uint32 i) else //if (m_spellInfo->Effect[i] == SPELL_EFFECT_KNOCK_BACK) { m_caster->GetPosition(x, y); - } + } unitTarget->KnockbackFrom(x, y, speedxy, speedz); } @@ -6742,7 +6742,7 @@ void Spell::EffectQuestClear(uint32 i) pPlayer = m_caster->ToPlayer(); else if (unitTarget && unitTarget->GetTypeId() == TYPEID_PLAYER) pPlayer = unitTarget->ToPlayer(); - + if (!pPlayer) return; diff --git a/src/server/game/Spells/SpellScript.cpp b/src/server/game/Spells/SpellScript.cpp index 22f40682128..db1f3facb62 100644 --- a/src/server/game/Spells/SpellScript.cpp +++ b/src/server/game/Spells/SpellScript.cpp @@ -171,7 +171,7 @@ Unit * SpellScript::GetCaster() Unit * SpellScript::GetOriginalCaster() { - return m_spell->GetOriginalCaster(); + return m_spell->GetOriginalCaster(); } SpellEntry const * SpellScript::GetSpellInfo() @@ -188,7 +188,7 @@ WorldLocation * SpellScript::GetDest() Unit * SpellScript::GetHitUnit() { - return m_spell->unitTarget; + return m_spell->unitTarget; } Creature * SpellScript::GetHitCreature() diff --git a/src/server/game/Spells/SpellScript.h b/src/server/game/Spells/SpellScript.h index 9a9ad1ab27b..f1e8b177ef8 100644 --- a/src/server/game/Spells/SpellScript.h +++ b/src/server/game/Spells/SpellScript.h @@ -78,7 +78,7 @@ class _SpellScript // // SpellScript/AuraScript interface base // these functions are safe to override, see notes below for usage instructions - // + // // Function in which handler functions are registered, must be implemented in script virtual void Register() = 0; // Function called on server startup, if returns false script won't be used in core @@ -116,7 +116,7 @@ class SpellScript : public _SpellScript // // SpellScript interface // hooks to which you can attach your functions - // + // // List of functions registered by EffectHandlerFn // allows more than one hook // example EffectHandlers += EffectHandlerFn(class::function, EffectIndexSpecifier, EffectNameSpecifier); @@ -135,9 +135,9 @@ class SpellScript : public _SpellScript WorldLocation * GetDest(); // methods useable only during spell hit on target phase: - + // returns: target of current effect if it was Unit otherwise NULL - Unit * GetHitUnit(); + Unit * GetHitUnit(); // returns: target of current effect if it was Creature otherwise NULL Creature * GetHitCreature(); // returns: target of current effect if it was Player otherwise NULL @@ -174,7 +174,7 @@ class SpellScript : public _SpellScript // EFFECT_1 - second effect matches // EFFECT_2 - third effect matches // EFFECT_FIRST_FOUND - first effect matching other conditions matches -// EFFECT_ALL - all effects of spell match +// EFFECT_ALL - all effects of spell match // // EffectNameSpecifier - specifies conditions for spell effect names // SPELL_EFFECT_ANY - any effect but not 0 matches condition diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.cpp b/src/server/game/Tools/CharacterDatabaseCleaner.cpp index 44e2289f819..4a7d3f3d501 100644 --- a/src/server/game/Tools/CharacterDatabaseCleaner.cpp +++ b/src/server/game/Tools/CharacterDatabaseCleaner.cpp @@ -49,7 +49,7 @@ void CharacterDatabaseCleaner::CleanDatabase() CharacterDatabase.Query("UPDATE worldstates SET value = 0 WHERE entry=20004"); } -void CharacterDatabaseCleaner::CheckUnique(const char* column, const +void CharacterDatabaseCleaner::CheckUnique(const char* column, const char* table, bool (*check)(uint32)) { QueryResult_AutoPtr result = CharacterDatabase.PQuery("SELECT DISTINCT %s FROM %s", column, table); diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index 4255d0407f9..43a3f827063 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -468,7 +468,7 @@ struct CliCommandHolder { typedef void Print(void*, const char*); typedef void CommandFinished(void*, bool success); - + void* m_callbackArg; char *m_command; Print* m_print; @@ -482,7 +482,7 @@ struct CliCommandHolder m_command = new char[len]; memcpy(m_command, command, len); } - + ~CliCommandHolder() { delete[] m_command; } }; diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp index 904c040722d..e194e6b27d5 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_prince_malchezaar.cpp @@ -164,7 +164,7 @@ public: void Cleanup() { Unit *pMalchezaar = Unit::GetUnit(*me, malchezaar); - + if (pMalchezaar && pMalchezaar->isAlive()) CAST_AI(boss_malchezaar::boss_malchezaarAI, CAST_CRE(pMalchezaar)->AI())->Cleanup(me, point); }
//below ... diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index 6c6d46880a2..287d8378c75 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -1171,26 +1171,26 @@ public: { if (damage < me->GetHealth()) return; - + //anything below only used if incoming damage will kill - + if (Phase == PHASE_ROMULO) { DoScriptText(SAY_ROMULO_DEATH, me); PretendToDie(me); IsFakingDeath = true; Phase = PHASE_BOTH; - + if (Creature* Julianne = (Unit::GetCreature((*me), JulianneGUID))) { CAST_AI(boss_julianne::boss_julianneAI, Julianne->AI())->RomuloDead = true; CAST_AI(boss_julianne::boss_julianneAI, Julianne->AI())->ResurrectSelfTimer = 10000; } - + damage = 0; return; } - + if (Phase == PHASE_BOTH) { if (JulianneDead) @@ -1206,7 +1206,7 @@ public: } return; } - + if (Creature* Julianne = (Unit::GetCreature((*me), JulianneGUID))) { PretendToDie(me); @@ -1217,7 +1217,7 @@ public: return; } } - + sLog.outError("TSCR: boss_romuloAI: DamageTaken reach end of code, that should not happen."); } @@ -1267,7 +1267,7 @@ public: { if (!UpdateVictim() || IsFakingDeath) return; - + if (JulianneDead) { if (ResurrectTimer <= diff) @@ -1283,7 +1283,7 @@ public: } } else ResurrectTimer -= diff; } - + if (BackwardLungeTimer <= diff) { Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true); @@ -1293,26 +1293,26 @@ public: BackwardLungeTimer = urand(15000,30000); } } else BackwardLungeTimer -= diff; - + if (DaringTimer <= diff) { DoCast(me, SPELL_DARING); DaringTimer = urand(20000,40000); } else DaringTimer -= diff; - + if (DeadlySwatheTimer <= diff) { if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_DEADLY_SWATHE); DeadlySwatheTimer = urand(15000,25000); } else DeadlySwatheTimer -= diff; - + if (PoisonThrustTimer <= diff) { DoCast(me->getVictim(), SPELL_POISON_THRUST); PoisonThrustTimer = urand(10000,20000); } else PoisonThrustTimer -= diff; - + DoMeleeAttackIfReady(); } }; diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp index 0345810478b..72c856730b6 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -185,10 +185,10 @@ public: } else sLog.outError("npc_unworthy_initiateAI: unable to find anchor!"); - + float dist = 99.0f; GameObject *prison = NULL; - + for (uint8 i = 0; i < 12; ++i) { if (GameObject* temp_prison = me->FindNearestGameObject(acherus_soul_prison[i],30)) @@ -200,7 +200,7 @@ public: } } } - + if (prison) prison->ResetDoorOrButton(); else @@ -231,7 +231,7 @@ public: me->setFaction(14); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); phase = PHASE_ATTACKING; - + if (Player *pTarget = Unit::GetPlayer(*me, playerGUID)) me->AI()->AttackStart(pTarget); wait_timer = 0; @@ -241,9 +241,9 @@ public: case PHASE_ATTACKING: if (!UpdateVictim()) return; - + events.Update(diff); - + while (uint32 eventId = events.ExecuteEvent()) { switch(eventId) @@ -270,7 +270,7 @@ public: break; } } - + DoMeleeAttackIfReady(); } } diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp index 55341d2c2f9..68ed9109f27 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_felmyst.cpp @@ -291,7 +291,7 @@ public: case 2: { Unit *pTarget = pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true); - if (!pTarget) + if (!pTarget) pTarget = Unit::GetUnit(*me, pInstance ? pInstance->GetData64(DATA_PLAYER_GUID) : 0); if (!pTarget) @@ -312,13 +312,13 @@ public: events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 10000); break; } - case 3: + case 3: { DespawnSummons(MOB_VAPOR_TRAIL); //DoCast(me, SPELL_VAPOR_SELECT); need core support Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true); - if (!pTarget) + if (!pTarget) pTarget = Unit::GetUnit(*me, pInstance ? pInstance->GetData64(DATA_PLAYER_GUID) : 0); if (!pTarget) @@ -348,7 +348,7 @@ public: case 5: { Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true); - if (!pTarget) + if (!pTarget) pTarget = Unit::GetUnit(*me, pInstance ? pInstance->GetData64(DATA_PLAYER_GUID) : 0); if (!pTarget) @@ -386,7 +386,7 @@ public: me->RemoveAurasDueToSpell(SPELL_FOG_BREATH); ++uiBreathCount; events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 1); - if (uiBreathCount < 3) + if (uiBreathCount < 3) uiFlightCount = 4; break; case 9: diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index 04d43100bf7..df113b719e2 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -170,10 +170,10 @@ enum Phase }; //Timers -enum KilJaedenTimers +enum KilJaedenTimers { TIMER_SPEECH = 0, - + //Phase 2 Timer TIMER_SOUL_FLAY = 1, TIMER_LEGION_LIGHTNING = 2, @@ -222,11 +222,11 @@ static Speech Speeches[]= //Kil Phase 2 -> Phase 3 {SAY_KALECGOS_AWAKEN, DATA_KALECGOS_KJ, 10000}, {SAY_ANVEENA_IMPRISONED, DATA_ANVEENA, 5000}, - {SAY_KJ_PHASE3, DATA_KILJAEDEN, 5000}, + {SAY_KJ_PHASE3, DATA_KILJAEDEN, 5000}, //Kil Phase 3 -> Phase 4 {SAY_KALECGOS_LETGO, DATA_KALECGOS_KJ, 10000}, {SAY_ANVEENA_LOST, DATA_ANVEENA, 8000}, - {SAY_KJ_PHASE4, DATA_KILJAEDEN, 7000}, + {SAY_KJ_PHASE4, DATA_KILJAEDEN, 7000}, //Kil Phase 4 -> Phase 5 {SAY_KALECGOS_FOCUS, DATA_KALECGOS_KJ, 4000}, {SAY_ANVEENA_KALEC, DATA_ANVEENA, 11000}, @@ -235,7 +235,7 @@ static Speech Speeches[]= {SAY_KJ_PHASE5, DATA_KILJAEDEN, 5500}, // use in End sequence? - {SAY_KALECGOS_GOODBYE, DATA_KALECGOS_KJ, 12000}, + {SAY_KALECGOS_GOODBYE, DATA_KALECGOS_KJ, 12000}, }; //AI for Kalecgos
class boss_kalecgos_kj : public CreatureScript @@ -268,7 +268,7 @@ public: me->setActive(true); for (uint8 i = 0; i < 4; ++i) - if (GameObject* pOrb = GetOrb(i)) + if (GameObject* pOrb = GetOrb(i)) pOrb->SetGoType(GAMEOBJECT_TYPE_BUTTON); } @@ -296,7 +296,7 @@ public: { me->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES); for (uint8 i = 0; i < 4; ++i) - if (GameObject* pOrb = GetOrb(i)) + if (GameObject* pOrb = GetOrb(i)) pOrb->SetUInt32Value(GAMEOBJECT_FACTION, 0); } @@ -378,7 +378,7 @@ public: { InstanceScript* pInstance = pGo->GetInstanceScript(); pPlayer->SummonCreature(CREATURE_POWER_OF_THE_BLUE_DRAGONFLIGHT, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 121000); - pPlayer->CastSpell(pPlayer, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, false); + pPlayer->CastSpell(pPlayer, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, false); pGo->SetUInt32Value(GAMEOBJECT_FACTION, 0); if (Creature* pKalec = Unit::GetCreature(*pPlayer, pInstance->GetData64(DATA_KALECGOS_KJ))) @@ -697,7 +697,7 @@ public: { switch(t) { - case TIMER_SPEECH: + case TIMER_SPEECH: if (SpeechBegins) { SpeechBegins=false; @@ -735,7 +735,7 @@ public: case TIMER_SOUL_FLAY: if (!me->IsNonMeleeSpellCasted(false)) { - DoCast(me->getVictim(), SPELL_SOUL_FLAY_SLOW, false); + DoCast(me->getVictim(), SPELL_SOUL_FLAY_SLOW, false); DoCast(me->getVictim(), SPELL_SOUL_FLAY, false); Timer[TIMER_SOUL_FLAY] = 3500; } @@ -749,7 +749,7 @@ public: for (uint8 z = 0; z < 6; ++z) { pRandomPlayer = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true); - if (!pRandomPlayer || !pRandomPlayer->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT,0)) + if (!pRandomPlayer || !pRandomPlayer->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT,0)) break; } @@ -757,7 +757,7 @@ public: DoCast(pRandomPlayer, SPELL_LEGION_LIGHTNING, false); else sLog.outError("try to cast SPELL_LEGION_LIGHTNING on invalid target"); - + Timer[TIMER_LEGION_LIGHTNING] = (Phase == PHASE_SACRIFICE) ? 18000 : 30000; // 18 seconds in PHASE_SACRIFICE Timer[TIMER_SOUL_FLAY] = 2500; } @@ -786,7 +786,7 @@ public: if (!me->IsNonMeleeSpellCasted(false)) { CastSinisterReflection(); - DoCastAOE(SPELL_SHADOW_SPIKE, false); + DoCastAOE(SPELL_SHADOW_SPIKE, false); ChangeTimers(true, 30000); Timer[TIMER_SHADOW_SPIKE] = 0; TimerIsDeactivated[TIMER_SPEECH] = false; @@ -978,8 +978,8 @@ public: { DoCast(me->getVictim(), SPELL_SHADOW_BOLT_VOLLEY); ShadowBoltVolleyTimer = 12000; - } - else + } + else ShadowBoltVolleyTimer -= diff; // Felfire Portal - Creatres a portal, that spawns Volatile Felfire Fiends, which do suicide bombing. @@ -1021,7 +1021,7 @@ public: uint32 uiSpawnFiendTimer; - void Reset() + void Reset() { uiSpawnFiendTimer = 5000; me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NON_ATTACKABLE); @@ -1227,7 +1227,7 @@ public: { DoTeleportTo(x,y,SHIELD_ORB_Z); bPointReached = true; - } + } else uiCheckTimer -= diff; } diff --git a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp index 99f7cd56eae..6f0a9acdc43 100644 --- a/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp +++ b/src/server/scripts/EasternKingdoms/Uldaman/instance_uldaman.cpp @@ -289,7 +289,7 @@ class instance_uldaman : public InstanceMapScript return 0; } // end GetData64 }; - + InstanceScript* OnGetInstanceData(InstanceMap* pMap) { return new instance_uldaman_InstanceMapScript(pMap); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp index 4f86318c5b6..28d21499e30 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp @@ -265,7 +265,7 @@ class boss_arlokk : public CreatureScript class go_gong_of_bethekk : public GameObjectScript { public: - go_gong_of_bethekk() : GameObjectScript("go_gong_of_bethekk") + go_gong_of_bethekk() : GameObjectScript("go_gong_of_bethekk") { } diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp index b09d1626db1..e663ff7914e 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_grilek.cpp @@ -38,7 +38,7 @@ class boss_grilek : public CreatureScript { } - struct boss_grilekAI : public ScriptedAI + struct boss_grilekAI : public ScriptedAI { boss_grilekAI(Creature *c) : ScriptedAI(c) {} diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp index 5d226bca91b..98b7e402554 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_hakkar.cpp @@ -244,7 +244,7 @@ class boss_hakkar : public CreatureScript DoMeleeAttackIfReady(); } }; - + CreatureAI* GetAI(Creature* creature) const { return new boss_hakkarAI(creature); diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp index c9d20db0380..0c5db040b19 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp @@ -216,7 +216,7 @@ class boss_jeklik : public CreatureScript DoMeleeAttackIfReady(); } } - }; + }; CreatureAI* GetAI(Creature* creature) const { @@ -289,7 +289,7 @@ class mob_batrider : public CreatureScript DoMeleeAttackIfReady(); } - }; + }; CreatureAI* GetAI(Creature* creature) const { diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp index d98fbf0f559..fb72ad61abd 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp @@ -167,7 +167,7 @@ class boss_jindo : public CreatureScript DoMeleeAttackIfReady(); } - }; + }; CreatureAI* GetAI(Creature* creature) const { diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp index 99392a6c7ce..0bbe81f900f 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp @@ -411,7 +411,7 @@ class mob_zealot_lorkhan : public CreatureScript DoMeleeAttackIfReady(); } - }; + }; CreatureAI* GetAI(Creature* creature) const { @@ -429,7 +429,7 @@ class mob_zealot_zath : public CreatureScript { } - struct mob_zealot_zathAI : public ScriptedAI + struct mob_zealot_zathAI : public ScriptedAI { mob_zealot_zathAI(Creature *c) : ScriptedAI(c) { diff --git a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp index b0172c041a4..cee1ea50032 100644 --- a/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp +++ b/src/server/scripts/EasternKingdoms/ZulGurub/boss_venoxis.cpp @@ -192,7 +192,7 @@ class boss_venoxis : public CreatureScript } DoMeleeAttackIfReady(); } - }; + }; CreatureAI* GetAI(Creature* creature) const { diff --git a/src/server/scripts/EasternKingdoms/eversong_woods.cpp b/src/server/scripts/EasternKingdoms/eversong_woods.cpp index db377a9fe63..bd80fff1532 100644 --- a/src/server/scripts/EasternKingdoms/eversong_woods.cpp +++ b/src/server/scripts/EasternKingdoms/eversong_woods.cpp @@ -456,11 +456,11 @@ public: if (questPhase > 0) { ++paladinPhase; - + if (paladinPhase < 4) questPhase = 2; else - Reset(); // Quest Complete, QuestComplete handler is + Reset(); // Quest Complete, QuestComplete handler is } } diff --git a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp index 9950955fd44..0a5f9bc28ec 100644 --- a/src/server/scripts/EasternKingdoms/western_plaguelands.cpp +++ b/src/server/scripts/EasternKingdoms/western_plaguelands.cpp @@ -272,16 +272,16 @@ enum eTruuen { NPC_GHOST_UTHER = 17233, NPC_THEL_DANIS = 1854, - NPC_GHOUL = 1791, //ambush + NPC_GHOUL = 1791, //ambush QUEST_TOMB_LIGHTBRINGER = 9446, - SAY_WP_0 = -1999981, //Beware! We are attacked! + SAY_WP_0 = -1999981, //Beware! We are attacked! SAY_WP_1 = -1999982, //It must be the purity of the Mark of the Lightbringer that is drawing forth the Scourge to attack us. We must proceed with caution lest we be overwhelmed! SAY_WP_2 = -1999983, //This land truly needs to be cleansed by the Light! Let us continue on to the tomb. It isn't far now... SAY_WP_3 = -1999984, //Be welcome, friends! - SAY_WP_4 = -1999985, //Thank you for coming here in remembrance of me. Your efforts in recovering that symbol, while unnecessary, are certainly touching to an old man's heart. - SAY_WP_5 = -1999986, //Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire. + SAY_WP_4 = -1999985, //Thank you for coming here in remembrance of me. Your efforts in recovering that symbol, while unnecessary, are certainly touching to an old man's heart. + SAY_WP_5 = -1999986, //Please, rise my friend. Keep the Blessing as a symbol of the strength of the Light and how heroes long gone might once again rise in each of us to inspire. SAY_WP_6 = -1999987 //Thank you my friend for making this possible. This is a day that I shall never forget! I think I will stay a while. Please return to High Priestess MacDonnell at the camp. I know that she'll be keenly interested to know of what has transpired here. };
class npc_anchorite_truuen : public CreatureScript @@ -293,8 +293,8 @@ public: { npc_escortAI* pEscortAI = CAST_AI(npc_anchorite_truuen::npc_anchorite_truuenAI, pCreature->AI()); - if (quest->GetQuestId() == QUEST_TOMB_LIGHTBRINGER) - pEscortAI->Start(true, true, pPlayer->GetGUID()); + if (quest->GetQuestId() == QUEST_TOMB_LIGHTBRINGER) + pEscortAI->Start(true, true, pPlayer->GetGUID()); return false; } @@ -316,7 +316,7 @@ public: Creature* Theldanis; void Reset() - { + { m_uiChatTimer = 7000; } @@ -325,7 +325,7 @@ public: if (pSummoned->GetEntry() == NPC_GHOUL) pSummoned->AI()->AttackStart(me); } - + void WaypointReached(uint32 i) { Player* pPlayer = GetPlayerForEscort(); @@ -339,7 +339,7 @@ public: case 9: DoScriptText(SAY_WP_1, me); break; - case 14: + case 14: me->SummonCreature(NPC_GHOUL, me->GetPositionX()+7.0f, me->GetPositionY()+7.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000); me->SummonCreature(NPC_GHOUL, me->GetPositionX()+5.0f, me->GetPositionY()+5.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000); me->SummonCreature(NPC_GHOUL, me->GetPositionX()+10.0f, me->GetPositionY()+10.0f, me->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 90000); @@ -347,14 +347,14 @@ public: break; case 15: DoScriptText(SAY_WP_2, me); - case 21: + case 21: Theldanis = GetClosestCreatureWithEntry(me, NPC_THEL_DANIS, 150); DoScriptText(SAY_WP_3, Theldanis); break; case 22: - break; + break; case 23: - Ughost = me->SummonCreature(NPC_GHOST_UTHER, 971.86,-1825.42 ,81.99 , 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); + Ughost = me->SummonCreature(NPC_GHOST_UTHER, 971.86,-1825.42 ,81.99 , 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); Ughost->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); DoScriptText(SAY_WP_4, Ughost, me); m_uiChatTimer = 4000; @@ -369,8 +369,8 @@ public: break; case 26: if (pPlayer) - pPlayer->GroupEventHappens(QUEST_TOMB_LIGHTBRINGER, me); - break; + pPlayer->GroupEventHappens(QUEST_TOMB_LIGHTBRINGER, me); + break; } } @@ -380,7 +380,7 @@ public: { Player* pPlayer = GetPlayerForEscort(); if (pPlayer) - pPlayer->FailQuest(QUEST_TOMB_LIGHTBRINGER); + pPlayer->FailQuest(QUEST_TOMB_LIGHTBRINGER); } void UpdateAI(const uint32 uiDiff) diff --git a/src/server/scripts/Examples/example_spell.cpp b/src/server/scripts/Examples/example_spell.cpp index ae42d050c73..3063f6f6d8b 100644 --- a/src/server/scripts/Examples/example_spell.cpp +++ b/src/server/scripts/Examples/example_spell.cpp @@ -52,9 +52,9 @@ class spell_ex_49375 : public SpellHandlerScript EffectHandlers += EffectHandlerFn(spell_ex_49375SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); // this will prompt an error on startup because effect 0 of spell 49375 is set to SPELL_EFFECT_DUMMY, not SPELL_EFFECT_APPLY_AURA //EffectHandlers += EffectHandlerFn(spell_gen_49375SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_APPLY_AURA); - // this will make HandleDummy function to be called on first != 0 effect of spell 49375 + // this will make HandleDummy function to be called on first != 0 effect of spell 49375 //EffectHandlers += EffectHandlerFn(spell_gen_49375SpellScript::HandleDummy, EFFECT_FIRST_FOUND, SPELL_EFFECT_ANY); - // this will make HandleDummy function to be called on all != 0 effect of spell 49375 + // this will make HandleDummy function to be called on all != 0 effect of spell 49375 //EffectHandlers += EffectHandlerFn(spell_gen_49375SpellScript::HandleDummy, EFFECT_ALL, SPELL_EFFECT_ANY); }; @@ -78,7 +78,7 @@ class spell_ex_49375 : public SpellHandlerScript // script will be immediately removed from the spell // for example - we don't want this script to be executed on a creature // if (GetCaster()->GetTypeID() != TYPEID_PLAYER) - // return false; + // return false; } // function called just before script delete @@ -98,7 +98,7 @@ class spell_ex_49375 : public SpellHandlerScript /* empty script for copypasting class spell_ex : public SpellHandlerScript { - public: + public: spell_ex() : SpellHandlerScript("spell_ex") { } class spell_ex_SpellScript : public SpellScript diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp index a78997410dc..28fbb65bf6f 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp +++ b/src/server/scripts/Kalimdor/OnyxiasLair/boss_onyxia.cpp @@ -18,10 +18,10 @@ /* ScriptData SDName: Boss_Onyxia SD%Complete: 95 -SDComment: <Known bugs> - Ground visual for Deep Breath effect; - Wing Buffet not ignoring armor; - Not summoning whelps on phase 3 (lacks info) +SDComment: <Known bugs> + Ground visual for Deep Breath effect; + Wing Buffet not ignoring armor; + Not summoning whelps on phase 3 (lacks info) </Known bugs> SDCategory: Onyxia's Lair EndScriptData */ @@ -110,7 +110,7 @@ public: struct boss_onyxiaAI : public ScriptedAI { - boss_onyxiaAI(Creature* pCreature) : ScriptedAI(pCreature), Summons(me) + boss_onyxiaAI(Creature* pCreature) : ScriptedAI(pCreature), Summons(me) { m_pInstance = pCreature->GetInstanceScript(); Reset(); @@ -140,7 +140,7 @@ public: uint8 m_uiSummonWhelpCount; uint8 m_uiSummonLairGuardCount; bool m_bIsMoving; - + void Reset() { if (!IsCombatMovement()) @@ -168,7 +168,7 @@ public: m_uiSummonWhelpCount = 0; m_uiSummonLairGuardCount = 0; m_bIsMoving = false; - + if (m_pInstance) { m_pInstance->SetData(DATA_ONYXIA, NOT_STARTED); @@ -181,7 +181,7 @@ public: { DoScriptText(SAY_AGGRO, me); me->SetInCombatWithZone(); - + if (m_pInstance) { m_pInstance->SetData(DATA_ONYXIA, IN_PROGRESS); @@ -203,7 +203,7 @@ public: pSummoned->SetInCombatWithZone(); if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) pSummoned->AI()->AttackStart(pTarget); - + switch (pSummoned->GetEntry()) { case NPC_WHELP: @@ -217,7 +217,7 @@ public: Summons.Summon(pSummoned); } - void SummonedCreatureDespawn(Creature *summon) + void SummonedCreatureDespawn(Creature *summon) { Summons.Despawn(summon); } @@ -265,14 +265,14 @@ public: default: m_bIsMoving = false; break; - } + } } } - - void SpellHitTarget(Unit* target, const SpellEntry* pSpell) + + void SpellHitTarget(Unit* target, const SpellEntry* pSpell) { //Workaround - Couldn't find a way to group this spells (All Eruption) - if (((pSpell->Id >= 17086 && pSpell->Id <= 17095) || + if (((pSpell->Id >= 17086 && pSpell->Id <= 17095) || (pSpell->Id == 17097) || (pSpell->Id >= 18351 && pSpell->Id <= 18361) || (pSpell->Id >= 18564 && pSpell->Id <= 18576) || @@ -331,7 +331,7 @@ public: if (me->GetHealth()*100 / me->GetMaxHealth() < 60) { m_uiPhase = PHASE_BREATH; - + if (m_pInstance) m_pInstance->SetData(DATA_ONYXIA_PHASE, m_uiPhase); @@ -419,7 +419,7 @@ public: if (m_uiDeepBreathTimer <= uiDiff) { - if (!m_bIsMoving) + if (!m_bIsMoving) { if (me->IsNonMeleeSpellCasted(false)) me->InterruptNonMeleeSpells(false); @@ -434,7 +434,7 @@ public: if (m_uiMovementTimer <= uiDiff) { - if (!m_bIsMoving) + if (!m_bIsMoving) { SetNextRandomPoint(); m_pPointData = GetMoveData(); @@ -463,7 +463,7 @@ public: else m_uiFireballTimer -= uiDiff; - if (m_uiLairGuardTimer <= uiDiff) + if (m_uiLairGuardTimer <= uiDiff) { me->SummonCreature(NPC_LAIRGUARD, aSpawnLocations[2].GetPositionX(), aSpawnLocations[2].GetPositionY(), aSpawnLocations[2].GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_DESPAWN); if (m_uiSummonLairGuardCount >= RAID_MODE(1,2)) @@ -484,8 +484,8 @@ public: if (m_uiSummonWhelpCount >= RAID_MODE(20,40)) { m_uiSummonWhelpCount = 0; - m_uiWhelpTimer = 90000; - } + m_uiWhelpTimer = 90000; + } else m_uiWhelpTimer = 500; } diff --git a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp index 7aebe80247c..094c7456419 100644 --- a/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp +++ b/src/server/scripts/Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp @@ -18,7 +18,7 @@ /* ScriptData SDName: Instance_Onyxias_Lair SD%Complete: 100 -SDComment: +SDComment: SDCategory: Onyxia's Lair EndScriptData */ @@ -40,9 +40,9 @@ public: //Eruption is a BFS graph problem //One map to remember all floor, one map to keep floor that still need to erupt and one queue to know what needs to be removed - std::map<uint64,uint32> FloorEruptionGUID[2]; - std::queue<uint64> FloorEruptionGUIDQueue; - + std::map<uint64,uint32> FloorEruptionGUID[2]; + std::queue<uint64> FloorEruptionGUIDQueue; + uint64 m_uiOnyxiasGUID; uint32 m_uiOnyxiaLiftoffTimer; uint32 m_uiManyWhelpsCounter; @@ -110,7 +110,7 @@ public: pFloorEruption->SendCustomAnim(); pFloorEruption->CastSpell(NULL, Difficulty(instance->GetSpawnMode()) == RAID_DIFFICULTY_10MAN_NORMAL ? 17731 : 69294); //pFloorEruption->GetGOInfo()->trap.spellId - //Get all immediatly nearby floors + //Get all immediatly nearby floors std::list<GameObject*> nearFloorList; Trinity::GameObjectInRangeCheck check(pFloorEruption->GetPositionX(), pFloorEruption->GetPositionY(), pFloorEruption->GetPositionZ(), 15); Trinity::GameObjectListSearcher<Trinity::GameObjectInRangeCheck> searcher(pFloorEruption, nearFloorList, check); @@ -211,12 +211,12 @@ public: } else m_uiOnyxiaLiftoffTimer -= uiDiff; } - if (!FloorEruptionGUIDQueue.empty()) + if (!FloorEruptionGUIDQueue.empty()) { if (m_uiEruptTimer <= uiDiff) { uint32 treeHeight = 0; - do + do { treeHeight = (*FloorEruptionGUID[1].find(FloorEruptionGUIDQueue.front())).second; FloorEruption(FloorEruptionGUIDQueue.front()); diff --git a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp index cba513bf520..cb49f66cba7 100644 --- a/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp +++ b/src/server/scripts/Kalimdor/ZulFarrak/instance_zulfarrak.cpp @@ -79,7 +79,7 @@ float pyramidSpawns [pyramidSpawnTotal][4] = { {3,7788,1889.94,1212.21}, {3,7275,1889.23,1207.72}, {3,7796,1879.77,1207.96} -}; +}; float Spawnsway[2][3] = { @@ -205,7 +205,7 @@ public: PyramidPhase=data; break; }; - } + } virtual void Update(uint32 diff) { @@ -254,14 +254,14 @@ public: SpawnPyramidWave(3); SetData(EVENT_PYRAMID,PYRAMID_PRE_WAVE_3); major_wave_Timer = 5000; //give NPCs time to return to their home spots - } - else + } + else if (minor_wave_Timer<diff) { SendAddsUpStairs(addGroupSize++); minor_wave_Timer=10000; - } - else + } + else minor_wave_Timer -= diff; break; case PYRAMID_PRE_WAVE_3: @@ -274,8 +274,8 @@ public: MoveNPCIfAlive(ENTRY_RAVEN,1883.68,1227.95,9.543,4.78); MoveNPCIfAlive(ENTRY_WEEGLI,1878.02,1227.65,9.485,4.78); SetData(EVENT_PYRAMID,PYRAMID_WAVE_3); - } - else + } + else major_wave_Timer -= diff; break; case PYRAMID_WAVE_3: diff --git a/src/server/scripts/Kalimdor/desolace.cpp b/src/server/scripts/Kalimdor/desolace.cpp index 565a16169b2..a3fadd2d226 100644 --- a/src/server/scripts/Kalimdor/desolace.cpp +++ b/src/server/scripts/Kalimdor/desolace.cpp @@ -28,7 +28,7 @@ npc_aged_dying_ancient_kodo EndContentData */ #include "ScriptPCH.h" -#include "ScriptedEscortAI.h" +#include "ScriptedEscortAI.h" enum eDyingKodo { @@ -200,7 +200,7 @@ public: bool OnQuestAccept(Player* pPlayer, Creature* pCreature, Quest const* quest) { if (quest->GetQuestId() == QUEST_RETURN_TO_VAHLARRIEL) - { + { if (npc_escortAI* pEscortAI = CAST_AI(npc_dalinda::npc_dalindaAI, pCreature->AI())) { pEscortAI->Start(true, false, pPlayer->GetGUID()); @@ -217,8 +217,8 @@ public: struct npc_dalindaAI : public npc_escortAI { - npc_dalindaAI(Creature* pCreature) : npc_escortAI(pCreature) { } - + npc_dalindaAI(Creature* pCreature) : npc_escortAI(pCreature) { } + void WaypointReached(uint32 i) { Player* pPlayer = GetPlayerForEscort(); @@ -226,11 +226,11 @@ public: { case 1: me->IsStandState(); - break; - case 15: + break; + case 15: if (pPlayer) pPlayer->GroupEventHappens(QUEST_RETURN_TO_VAHLARRIEL, me); - break; + break; } } @@ -247,7 +247,7 @@ public: } void UpdateAI(const uint32 uiDiff) - { + { npc_escortAI::UpdateAI(uiDiff); if (!UpdateVictim()) return; diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp index 7ea4afbcb4b..bfc402e5327 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp @@ -65,7 +65,7 @@ enum ACHIEV_TIMED_START_EVENT = 20381, }; -enum Phases +enum Phases { PHASE_MELEE = 0, PHASE_UNDERGROUND = 1, @@ -81,7 +81,7 @@ const Position SpawnPoint[2] = }; const Position SpawnPointGuardian[2] = -{ +{ { 550.348633, 316.006805, 234.2947 }, { 550.188660, 324.264557, 237.7412 }, }; @@ -113,11 +113,11 @@ public: uint32 uiUndergroundTimer; uint32 uiVenomancerTimer; uint32 uiDatterTimer; - + uint32 uiImpaleTimer; uint32 uiImpalePhase; uint64 uiImpaleTarget; - + SummonList lSummons; void Reset() @@ -136,7 +136,7 @@ public: me->RemoveAura(SPELL_SUBMERGE); lSummons.DespawnAll(); - + if (pInstance) { pInstance->SetData(DATA_ANUBARAK_EVENT, NOT_STARTED); @@ -177,14 +177,14 @@ public: return; switch (uiPhase) - { + { case PHASE_UNDERGROUND: if (uiImpaleTimer <= diff) { switch(uiImpalePhase) - { + { case IMPALE_PHASE_TARGET: - if (Unit *target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) + if (Unit *target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) { if (Creature *pImpaleTarget = DoSummonImpaleTarget(target)) pImpaleTarget->CastSpell(pImpaleTarget, SPELL_IMPALE_SHAKEGROUND, true); @@ -288,7 +288,7 @@ public: DoCast(me, SPELL_SUBMERGE, false); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); - + uiPhase = PHASE_UNDERGROUND; ++uiUndergroundPhase; } @@ -305,7 +305,7 @@ public: DoCastVictim(SPELL_CARRION_BEETLES); uiCarrionBeetlesTimer = 25*IN_MILLISECONDS; } else uiCarrionBeetlesTimer -= diff; - + if (uiLeechingSwarmTimer <= diff) { DoCast(me, SPELL_LEECHING_SWARM, true); @@ -326,7 +326,7 @@ public: break; } } - + void JustDied(Unit * /*pKiller*/) { DoScriptText(SAY_DEATH, me); diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp index bc0d56cceae..d3e477b1b2b 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/instance_azjol_nerub.cpp @@ -136,7 +136,7 @@ public: if (data == IN_PROGRESS) for (uint8 i = 0; i < 3; ++i) HandleGameObject(uiAnubarakDoor[i], false); - else if (data == NOT_STARTED || data == DONE) + else if (data == NOT_STARTED || data == DONE) for (uint8 i = 0; i < 3; ++i) HandleGameObject(uiAnubarakDoor[i], true); break; diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp index 5ed714e897e..b18b0e01250 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/boss_falric.cpp @@ -33,7 +33,7 @@ enum Spells SPELL_QUIVERING_STRIKE = 72422, SPELL_IMPENDING_DESPAIR = 72426, SPELL_DEFILING_HORROR = 72435, - SPELL_HOPELESSNESS = 72395, + SPELL_HOPELESSNESS = 72395, H_SPELL_HOPELESSNESS = 72390, // TODO: not in dbc. Add in DB. }; diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp index 89c47a344ed..47e7c7270b4 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp @@ -71,7 +71,7 @@ enum Yells enum Events { EVENT_NONE, - + EVENT_START_INTRO, EVENT_SKIP_INTRO, @@ -133,7 +133,7 @@ enum eEnum QUEST_DELIVRANCE_FROM_THE_PIT_H2 = 24712, QUEST_WRATH_OF_THE_LICH_KING_A2 = 24500, QUEST_WRATH_OF_THE_LICH_KING_H2 = 24802, -}; +}; static Position HallsofReflectionLocs[]= { @@ -201,7 +201,7 @@ public: // AI of Part1: handle the intro till start of gauntlet event. struct npc_jaina_or_sylvanas_horAI : public ScriptedAI { - npc_jaina_or_sylvanas_horAI(Creature *pCreature) : ScriptedAI(pCreature) + npc_jaina_or_sylvanas_horAI(Creature *pCreature) : ScriptedAI(pCreature) { pInstance = me->GetInstanceScript(); } @@ -224,7 +224,7 @@ public: me->SetVisibility(VISIBILITY_ON); } - void DoAction(const int32 actionId) + void DoAction(const int32 actionId) { switch(actionId) { @@ -276,7 +276,7 @@ public: events.ScheduleEvent(EVENT_INTRO_A2_5, 2000); break; case EVENT_INTRO_A2_5: - if (Creature* pUther = me->GetCreature(*me, uiUther)) + if (Creature* pUther = me->GetCreature(*me, uiUther)) DoScriptText(SAY_UTHER_INTRO_A2_1, pUther); events.ScheduleEvent(EVENT_INTRO_A2_6, 3000); break; @@ -285,7 +285,7 @@ public: events.ScheduleEvent(EVENT_INTRO_A2_7, 6000); break; case EVENT_INTRO_A2_7: - if (Creature* pUther = me->GetCreature(*me, uiUther)) + if (Creature* pUther = me->GetCreature(*me, uiUther)) DoScriptText(SAY_UTHER_INTRO_A2_2, pUther); events.ScheduleEvent(EVENT_INTRO_A2_8, 6500); break; @@ -294,7 +294,7 @@ public: events.ScheduleEvent(EVENT_INTRO_A2_9, 2000); break; case EVENT_INTRO_A2_9: - if (Creature* pUther = me->GetCreature(*me, uiUther)) + if (Creature* pUther = me->GetCreature(*me, uiUther)) DoScriptText(SAY_UTHER_INTRO_A2_3, pUther); events.ScheduleEvent(EVENT_INTRO_A2_10, 9000); break; @@ -303,7 +303,7 @@ public: events.ScheduleEvent(EVENT_INTRO_A2_11, 5000); break; case EVENT_INTRO_A2_11: - if (Creature* pUther = me->GetCreature(*me, uiUther)) + if (Creature* pUther = me->GetCreature(*me, uiUther)) DoScriptText(SAY_UTHER_INTRO_A2_4, pUther); events.ScheduleEvent(EVENT_INTRO_A2_12, 11000); break; @@ -312,7 +312,7 @@ public: events.ScheduleEvent(EVENT_INTRO_A2_13, 4000); break; case EVENT_INTRO_A2_13: - if (Creature* pUther = me->GetCreature(*me, uiUther)) + if (Creature* pUther = me->GetCreature(*me, uiUther)) DoScriptText(SAY_UTHER_INTRO_A2_5, pUther); events.ScheduleEvent(EVENT_INTRO_A2_14, 12500); break; @@ -321,12 +321,12 @@ public: events.ScheduleEvent(EVENT_INTRO_A2_15, 10000); break; case EVENT_INTRO_A2_15: - if (Creature* pUther = me->GetCreature(*me, uiUther)) + if (Creature* pUther = me->GetCreature(*me, uiUther)) DoScriptText(SAY_UTHER_INTRO_A2_6, pUther); events.ScheduleEvent(EVENT_INTRO_A2_16, 22000); break; case EVENT_INTRO_A2_16: - if (Creature* pUther = me->GetCreature(*me, uiUther)) + if (Creature* pUther = me->GetCreature(*me, uiUther)) DoScriptText(SAY_UTHER_INTRO_A2_7, pUther); events.ScheduleEvent(EVENT_INTRO_A2_17, 4000); break; @@ -335,7 +335,7 @@ public: events.ScheduleEvent(EVENT_INTRO_A2_18, 2000); break; case EVENT_INTRO_A2_18: - if (Creature* pUther = me->GetCreature(*me, uiUther)) + if (Creature* pUther = me->GetCreature(*me, uiUther)) { pUther->HandleEmoteCommand(EMOTE_ONESHOT_NO); DoScriptText(SAY_UTHER_INTRO_A2_8, pUther); @@ -372,7 +372,7 @@ public: events.ScheduleEvent(EVENT_INTRO_H2_5, 2000); break; case EVENT_INTRO_H2_5: - if (Creature* pUther = me->GetCreature(*me, uiUther)) + if (Creature* pUther = me->GetCreature(*me, uiUther)) DoScriptText(SAY_UTHER_INTRO_H2_1, pUther); events.ScheduleEvent(EVENT_INTRO_H2_6, 11000); break; @@ -381,7 +381,7 @@ public: events.ScheduleEvent(EVENT_INTRO_H2_7, 3000); break; case EVENT_INTRO_H2_7: - if (Creature* pUther = me->GetCreature(*me, uiUther)) + if (Creature* pUther = me->GetCreature(*me, uiUther)) DoScriptText(SAY_UTHER_INTRO_H2_2, pUther); events.ScheduleEvent(EVENT_INTRO_H2_8, 6000); break; @@ -424,7 +424,7 @@ public: DoScriptText(SAY_SYLVANAS_INTRO_8, me); events.ScheduleEvent(EVENT_INTRO_LK_1, 2000); break; - + // Remaining Intro Events common for both faction case EVENT_INTRO_LK_1: // Spawn LK in front of door, and make him move to the sword. @@ -451,40 +451,40 @@ public: break; case EVENT_INTRO_LK_3: - // The Lich King banishes Uther to the abyss. + // The Lich King banishes Uther to the abyss. if (Creature* pUther = me->GetCreature(*me, uiUther)) { pUther->DisappearAndDie(); uiUther = 0; } - - // He steps forward and removes the runeblade from the heap of skulls. - + + // He steps forward and removes the runeblade from the heap of skulls. + events.ScheduleEvent(EVENT_INTRO_LK_4, 4000); break; - + case EVENT_INTRO_LK_4: if (Creature* pLichKing = me->GetCreature(*me, uiLichKing)) DoScriptText(SAY_LK_INTRO_2, pLichKing); events.ScheduleEvent(EVENT_INTRO_LK_5, 10000); break; - + case EVENT_INTRO_LK_5: // summon Falric and Marwyn. then go back to the door if (Creature* pFalric = me->GetCreature(*me, pInstance->GetData64(DATA_FALRIC))) pFalric->SetVisibility(VISIBILITY_ON); if (Creature* pMarwyn = me->GetCreature(*me, pInstance->GetData64(DATA_MARWYN))) pMarwyn->SetVisibility(VISIBILITY_ON); - + if (Creature* pLichKing = me->GetCreature(*me, uiLichKing)) { pLichKing->GetMotionMaster()->MovePoint(0, LichKingSpawnPos); DoScriptText(SAY_LK_INTRO_3, pLichKing); } - + events.ScheduleEvent(EVENT_INTRO_LK_6, 8000); break; - + case EVENT_INTRO_LK_6: if (Creature* pFalric = me->GetCreature(*me, pInstance->GetData64(DATA_FALRIC))) DoScriptText(SAY_FALRIC_INTRO_1, pFalric); @@ -498,7 +498,7 @@ public: events.ScheduleEvent(EVENT_INTRO_LK_8, 2000); break; - + case EVENT_INTRO_LK_8: if (Creature* pFalric = me->GetCreature(*me, pInstance->GetData64(DATA_FALRIC))) DoScriptText(SAY_FALRIC_INTRO_2, pFalric); @@ -516,7 +516,7 @@ public: // TODO: Loralen/Koreln shall run also events.ScheduleEvent(EVENT_INTRO_END, 10000); break; - + case EVENT_INTRO_END: if (pInstance) pInstance->SetData(DATA_WAVE_COUNT, SPECIAL); // start first wave diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h index 29fc462b15b..df54e58c574 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.h @@ -83,11 +83,11 @@ struct boss_horAI : ScriptedAI { pInstance = me->GetInstanceScript(); } - + InstanceScript* pInstance; EventMap events; SummonList summons; - + void Reset() { events.Reset(); @@ -121,11 +121,11 @@ struct boss_horAI : ScriptedAI break; } } - + void JustSummoned(Creature *pSummoned) { summons.Summon(pSummoned); - + if (Unit *pUnit = pSummoned->SelectNearestTarget()) { if (pSummoned->AI()) diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp index 5d1626ec3d1..bd5f551cffd 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp @@ -27,7 +27,7 @@ EndScriptData */ enum Spells { - + SPELL_ARCANE_SHIELD = 53813, //Dummy --> Channeled, shields the caster from damage. SPELL_EMPOWERED_ARCANE_EXPLOSION = 51110, SPELL_EMPOWERED_ARCANE_EXPLOSION_2 = 59377, @@ -58,7 +58,7 @@ enum eCreature NPC_PHANTASMAL_AIR = 27650, NPC_PHANTASMAL_FIRE = 27651, NPC_PHANTASMAL_WATER = 27653, - + NPC_PHANTASMAL_MURLOC = 27649, NPC_PHANTASMAL_NAGAL = 27648, NPC_PHANTASMAL_OGRE = 27647 @@ -176,7 +176,7 @@ public: pWho->SetInCombatWith(me); me->GetMotionMaster()->MoveChase(pWho, 0,0); - } + } } } @@ -190,7 +190,7 @@ public: uiGroup[0] = urand(0,2); uiGroup[1] = urand(0,2); uiGroup[2] = urand(0,2); - } + } } void SetPosition(uint8 uiI) @@ -247,7 +247,7 @@ public: if (!pInstance || pInstance->GetData(DATA_UROM_PLATAFORM) < 2) return; - + if (uiTeleportTimer <= uiDiff) { me->InterruptNonMeleeSpells(false); @@ -291,7 +291,7 @@ public: if (uiFrostBombTimer <= uiDiff) { DoCastVictim(SPELL_FROSTBOMB); - uiFrostBombTimer = urand(5000,8000); + uiFrostBombTimer = urand(5000,8000); } else uiFrostBombTimer -= uiDiff; if (uiTimeBombTimer <= uiDiff) @@ -342,7 +342,7 @@ public: break; case SPELL_TELEPORT: me->AddUnitMovementFlag(MOVEMENTFLAG_CAN_FLY); // with out it the npc will fall down while is casting - bCanCast = true; + bCanCast = true; break; default: break; diff --git a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp index 8f023a98968..0417c7071c9 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/instance_oculus.cpp @@ -83,7 +83,7 @@ public: pGO->SetGoState(GO_STATE_ACTIVE); else pGO->SetGoState(GO_STATE_READY); - + GameObjectList.push_back(pGO->GetGUID()); } } @@ -141,7 +141,7 @@ public: return 0; } - + void OpenCageDoors() { if (GameObjectList.empty()) diff --git a/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp b/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp index 6dc24313584..29a3bac2bdb 100644 --- a/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp +++ b/src/server/scripts/Northrend/ObsidianSanctum/boss_sartharion.cpp @@ -115,7 +115,7 @@ enum eEnums SPELL_FLAME_TSUNAMI_DMG_AURA = 57491, // periodic damage, npc has this aura SPELL_FLAME_TSUNAMI_BUFF = 60430, - + NPC_FLAME_TSUNAMI = 30616, // for the flame waves NPC_LAVA_BLAZE = 30643, // adds spawning from flame strike @@ -398,7 +398,7 @@ public: pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_DUO,H_ACHIEV_TWILIGHT_DUO)); pInstance->DoCompleteAchievement(RAID_MODE(ACHIEV_TWILIGHT_ZONE,H_ACHIEV_TWILIGHT_ZONE)); } - + pInstance->SetData(TYPE_SARTHARION_EVENT, DONE); } } @@ -860,7 +860,7 @@ struct dummy_dragonAI : public ScriptedAI case NPC_TENEBRON: { iTextId = WHISPER_HATCH_EGGS; - if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) + if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) { for(uint32 i = 0; i < 6; ++i) me->SummonCreature(NPC_TWILIGHT_EGG, TwilightEggs[i].x, TwilightEggs[i].y, TwilightEggs[i].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20000); @@ -1273,7 +1273,7 @@ public: else { OpenPortal(); - DoCast(me->getVictim(), SPELL_TWILIGHT_TORMENT_VESP); + DoCast(me->getVictim(), SPELL_TWILIGHT_TORMENT_VESP); m_uiAcolyteVesperonTimer = urand(60000,70000); } } @@ -1324,7 +1324,7 @@ public: InstanceScript* pInstance; uint32 uiDespawnTimer; - + void Reset() { uiDespawnTimer = 28000; @@ -1361,7 +1361,7 @@ public: if (map->IsDungeon()) { Map::PlayerList const &PlayerList = map->GetPlayers(); - + if (PlayerList.isEmpty()) return; @@ -1437,14 +1437,14 @@ public: uiDespawnTimer = 28000; if (pInstance) { - me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me); + me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER,me); } DoCast(me, SPELL_TWILIGHT_TORMENT_VESP_ACO); } void JustDied(Unit* pKiller) { - me->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP_ACO); + me->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP_ACO); // remove twilight torment on Vesperon if (pInstance) @@ -1455,7 +1455,7 @@ public: if (pVesperon && pVesperon->isAlive() && pVesperon->HasAura(SPELL_TWILIGHT_TORMENT_VESP)) pVesperon->RemoveAurasDueToSpell(SPELL_TWILIGHT_TORMENT_VESP); - + Map *map = me->GetMap(); if (map->IsDungeon()) { @@ -1520,7 +1520,7 @@ public: struct mob_twilight_eggsAI : public Scripted_NoMovementAI { mob_twilight_eggsAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) - { + { pInstance = pCreature->GetInstanceScript(); } @@ -1538,23 +1538,23 @@ public: m_uiFadeArmorTimer = 1000; m_uiHatchEggTimer = 20000; } - + void SpawnWhelps() { me->RemoveAllAuras(); if (!pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS) me->SummonCreature(NPC_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); - else + else me->SummonCreature(NPC_SHARTHARION_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000); me->DealDamage(me, me->GetHealth()); } - + void JustSummoned(Creature* pWho) { pWho->SetInCombatWithZone(); } - + void UpdateAI(const uint32 uiDiff) { if (m_uiHatchEggTimer <= uiDiff) @@ -1565,9 +1565,9 @@ public: SpawnWhelps(); } else - m_uiHatchEggTimer -= uiDiff; + m_uiHatchEggTimer -= uiDiff; } - + void AttackStart(Unit* pWho) {} void MoveInLineOfSight(Unit* pWho) {} @@ -1608,7 +1608,7 @@ public: TsunamiBuff_timer = 1000; entry = 0; } - + void UpdateAI(const uint32 diff) { if (Tsunami_Timer <= diff) @@ -1616,7 +1616,7 @@ public: DoCast(me,SPELL_FLAME_TSUNAMI_DMG_AURA); Tsunami_Timer = 500; }else Tsunami_Timer -= diff; - + if(TsunamiBuff_timer <= diff) { if (Unit* LavaBlaze = GetClosestCreatureWithEntry(me,NPC_LAVA_BLAZE, 10.0f, true)) diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp index c503f909d52..0278b8f9ca3 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/boss_flame_leviathan.cpp @@ -689,7 +689,7 @@ public: } void UpdateAI(const uint32 diff) - { + { } };
}; diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp b/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp index d436d96d15f..0e8c1d40f2f 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp +++ b/src/server/scripts/Northrend/Ulduar/ulduar/instance_ulduar.cpp @@ -72,7 +72,7 @@ public: uint64 uiFreyaChestGUID; void Initialize() - { + { uiIgnisGUID = 0; uiRazorscaleGUID = 0; uiXT002GUID = 0; @@ -113,7 +113,7 @@ public: switch(pCreature->GetEntry()) { case NPC_LEVIATHAN: - uiLeviathanGUID = pCreature->GetGUID(); + uiLeviathanGUID = pCreature->GetGUID(); break; case NPC_IGNIS: uiIgnisGUID = pCreature->GetGUID(); @@ -194,10 +194,10 @@ public: if (flag == 7) flag =0; break; - case GO_LEVIATHAN_GATE: + case GO_LEVIATHAN_GATE: uiLeviathanGateGUID = add ? pGO->GetGUID() : NULL; - HandleGameObject(NULL, false, pGO); - break; + HandleGameObject(NULL, false, pGO); + break; } } @@ -211,7 +211,7 @@ public: { case EVENT_TOWER_OF_STORM_DESTROYED: //pGO->GetInstanceScript()->SetData(DATA_TOWER_STORMS,DESTROYED); - pFlameLeviathan->AI()->DoAction(1); + pFlameLeviathan->AI()->DoAction(1); break; case EVENT_TOWER_OF_FROST_DESTROYED: pFlameLeviathan->AI()->DoAction(2); @@ -277,9 +277,9 @@ public: if (Creature* pBoss = instance->GetCreature(uiLeviathanGUID)) pBoss->AI()->DoAction(10); if (GameObject* pGate = instance->GetGameObject(uiLeviathanGateGUID)) - pGate->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + pGate->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); } - break; + break; default: break; } diff --git a/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h b/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h index a6d1271ce0e..df3f4375bc1 100644 --- a/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h +++ b/src/server/scripts/Northrend/Ulduar/ulduar/ulduar.h @@ -42,7 +42,7 @@ enum eTypes DATA_MOLGEIM = 21, DATA_BRUNDIR = 22, DATA_RUNEMASTER_MOLGEIM = 23, - DATA_STORMCALLER_BRUNDIR = 24, + DATA_STORMCALLER_BRUNDIR = 24, NPC_LEVIATHAN = 33113, NPC_IGNIS = 33118, diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp index 368b769885f..33e1ff74381 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp @@ -268,7 +268,7 @@ public: Summons.Summon(pSummoned); } - void SummonedCreatureDespawn(Creature* pSummoned) + void SummonedCreatureDespawn(Creature* pSummoned) { if (pSummoned->GetEntry() == CREATURE_GRAUF) m_uiGraufGUID = 0; @@ -310,7 +310,7 @@ public: case FLYING: if (!UpdateVictim()) return; - + if (me->GetPositionX() >= 519) { me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); @@ -325,14 +325,14 @@ public: me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); m_bSaidEmote = false; } - + if (m_uiMountTimer && m_uiMountTimer <= diff) { me->Mount(DATA_MOUNT); me->SetFlying(true); m_uiMountTimer = 0; } else m_uiMountTimer -= diff; - + if (m_uiSummonTimer <= diff) { SpawnMobs(); @@ -343,35 +343,35 @@ public: { switch(m_uiWaypointId) { - case 0: - me->GetMotionMaster()->MovePoint(0, Location[1].GetPositionX(), Location[1].GetPositionY(), Location[1].GetPositionZ()); + case 0: + me->GetMotionMaster()->MovePoint(0, Location[1].GetPositionX(), Location[1].GetPositionY(), Location[1].GetPositionZ()); m_uiMovementTimer = 5000; break; - case 1: + case 1: me->GetMotionMaster()->MovePoint(0, Location[2].GetPositionX(), Location[2].GetPositionY(), Location[2].GetPositionZ()); m_uiMovementTimer = 2000; break; - case 2: + case 2: me->GetMotionMaster()->MovePoint(0, Location[3].GetPositionX(), Location[3].GetPositionY(), Location[3].GetPositionZ()); m_uiMovementTimer = 15000; break; case 3: - me->GetMotionMaster()->MovePoint(0, Location[69].GetPositionX(), Location[69].GetPositionY(), Location[69].GetPositionZ()); + me->GetMotionMaster()->MovePoint(0, Location[69].GetPositionX(), Location[69].GetPositionY(), Location[69].GetPositionZ()); DoScriptText(RAND(SAY_DRAKE_BREATH_1,SAY_DRAKE_BREATH_2), me); DoScriptText(EMOTE_BREATH, me); m_uiMovementTimer = 2500; break; case 4: - me->GetMotionMaster()->MovePoint(0, Location[70].GetPositionX(), Location[70].GetPositionY(), Location[70].GetPositionZ()); + me->GetMotionMaster()->MovePoint(0, Location[70].GetPositionX(), Location[70].GetPositionY(), Location[70].GetPositionZ()); m_uiMovementTimer = 2000; SpawnTrigger(); break; case 5: - me->GetMotionMaster()->MovePoint(0, Location[71].GetPositionX(), Location[71].GetPositionY(), Location[71].GetPositionZ()); + me->GetMotionMaster()->MovePoint(0, Location[71].GetPositionX(), Location[71].GetPositionY(), Location[71].GetPositionZ()); m_uiMovementTimer = 3000; break; case 6: - me->GetMotionMaster()->MovePoint(0, Location[3].GetPositionX(), Location[3].GetPositionY(), Location[3].GetPositionZ()); + me->GetMotionMaster()->MovePoint(0, Location[3].GetPositionX(), Location[3].GetPositionY(), Location[3].GetPositionZ()); m_uiWaypointId = 2; m_uiMovementTimer = 15000; break; diff --git a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp index c0e7cfdbb88..d54dded37c3 100644 --- a/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/instance_violet_hold.cpp @@ -193,7 +193,7 @@ public: uiSaboteurPortal = 0; trashMobs.clear(); - + uiRemoveNpc = 0; uiDoorIntegrity = 100; diff --git a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp index 59547c7ca5c..215a4f3d6d2 100644 --- a/src/server/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/server/scripts/Northrend/VioletHold/violet_hold.cpp @@ -474,12 +474,12 @@ public: break; } } - + void UpdateAI(const uint32 diff) { if (pInstance && pInstance->GetData(DATA_MAIN_EVENT_PHASE != IN_PROGRESS)) me->CastStop(); - + npc_escortAI::UpdateAI(diff); if(!bHasGotMovingPoints) @@ -557,7 +557,7 @@ public: uint32 uiSpawnTimer; bool bPortalGuardianOrKeeperOrEliteSpawn; uint8 uiTypeOfMobsPortal; - + SummonList listOfMobs; InstanceScript *pInstance; @@ -569,14 +569,14 @@ public: } void EnterCombat(Unit * /*who*/) {} - + void MoveInLineOfSight(Unit * /*who*/) {} void UpdateAI(const uint32 diff) { if (!pInstance) //Massive usage of pInstance, global check return; - + if (pInstance->GetData(DATA_REMOVE_NPC) == 1) { me->ForcedDespawn(); diff --git a/src/server/scripts/Northrend/dragonblight.cpp b/src/server/scripts/Northrend/dragonblight.cpp index 2b849cc3d12..4cc68b4585c 100644 --- a/src/server/scripts/Northrend/dragonblight.cpp +++ b/src/server/scripts/Northrend/dragonblight.cpp @@ -74,7 +74,7 @@ public: enum eInquisitor -{ +{ NPC_GODFREY = 27577, SPELL_HOLY_FIRE = 39323, @@ -116,7 +116,7 @@ public: npc_inquisitor_hallard() : CreatureScript("npc_inquisitor_hallard") { } struct npc_inquisitor_hallardAI : public npc_escortAI - { + { npc_inquisitor_hallardAI(Creature* pCreature) : npc_escortAI(pCreature) { } bool Completed; @@ -128,22 +128,22 @@ public: return; Creature* Godfrey = me->FindNearestCreature(NPC_GODFREY, 50, true); if (!Godfrey) - return; + return; switch (i) { - case 1: + case 1: DoScriptText(SAY_WP_1, me, Godfrey); me->SetUInt64Value(UNIT_FIELD_TARGET, Godfrey->GetGUID()); me->HandleEmoteCommand(5); me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); - me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); break; case 2: Godfrey->HandleEmoteCommand(434); DoScriptText(SAY_WP_2, me, Godfrey); me->HandleEmoteCommand(15); break; - case 3: + case 3: DoScriptText(SAY_WP_3, me, Godfrey); me->HandleEmoteCommand(1); break; @@ -165,7 +165,7 @@ public: me->HandleEmoteCommand(16); break; case 9: - DoScriptText(SAY_WP_9, me, Godfrey); + DoScriptText(SAY_WP_9, me, Godfrey); me->HandleEmoteCommand(5); break; case 10: @@ -229,33 +229,33 @@ public: case 27: DoScriptText(SAY_WP_27, me, Godfrey); me->SetUInt64Value(UNIT_FIELD_TARGET, Godfrey->GetGUID()); - Completed = true; + Completed = true; if (pPlayer) pPlayer->GroupEventHappens(QUEST_A_RIGHTEOUS_SERMON, me); - break; + break; } } void Reset() - { + { Completed = false; - } + } void UpdateAI(const uint32 diff) - { - npc_escortAI::UpdateAI(diff); + { + npc_escortAI::UpdateAI(diff); } }; bool OnQuestAccept(Player* pPlayer, Creature* pCreature, Quest const* quest) { if (quest->GetQuestId() == QUEST_A_RIGHTEOUS_SERMON) - { + { DoScriptText(SAY_WP_0, pCreature, pPlayer); if (npc_escortAI* pEscortAI = CAST_AI(npc_inquisitor_hallard::npc_inquisitor_hallardAI, pCreature->AI())) { pEscortAI->Start(true, false, pPlayer->GetGUID(), 0, true); - pCreature->GetMotionMaster()->MovePoint(0, 3801.543, -679.350, 213.75); + pCreature->GetMotionMaster()->MovePoint(0, 3801.543, -679.350, 213.75); } } return true; diff --git a/src/server/scripts/Northrend/grizzly_hills.cpp b/src/server/scripts/Northrend/grizzly_hills.cpp index fcf0775f0c8..9d91f7c14c4 100644 --- a/src/server/scripts/Northrend/grizzly_hills.cpp +++ b/src/server/scripts/Northrend/grizzly_hills.cpp @@ -576,12 +576,12 @@ public: struct npc_wounded_skirmisherAI : public ScriptedAI { npc_wounded_skirmisherAI(Creature *c) : ScriptedAI(c) {} - + uint64 uiPlayerGUID; uint32 DespawnTimer; - void Reset () + void Reset () { DespawnTimer = 5000; uiPlayerGUID = 0; @@ -594,23 +594,23 @@ public: } void SpellHit(Unit *caster, const SpellEntry *spell) - { + { if (spell->Id == SPELL_RENEW_SKIRMISHER && caster->GetTypeId() == TYPEID_PLAYER && caster->ToPlayer()->GetQuestStatus(12288) == QUEST_STATUS_INCOMPLETE) - { + { caster->ToPlayer()->KilledMonsterCredit(CREDIT_NPC, 0); DoScriptText(RAND(RANDOM_SAY_1,RANDOM_SAY_2,RANDOM_SAY_3),caster); - if(me->IsStandState()) - me->GetMotionMaster()->MovePoint(1, me->GetPositionX()+7, me->GetPositionY()+7, me->GetPositionZ()); + if(me->IsStandState()) + me->GetMotionMaster()->MovePoint(1, me->GetPositionX()+7, me->GetPositionY()+7, me->GetPositionZ()); else { me->SetStandState(UNIT_STAND_STATE_STAND); - me->ForcedDespawn(DespawnTimer); + me->ForcedDespawn(DespawnTimer); } - + } } - + void UpdateAI(const uint32 /*diff*/) { if (!UpdateVictim()) diff --git a/src/server/scripts/Northrend/sholazar_basin.cpp b/src/server/scripts/Northrend/sholazar_basin.cpp index cd175d20797..a77063669cc 100644 --- a/src/server/scripts/Northrend/sholazar_basin.cpp +++ b/src/server/scripts/Northrend/sholazar_basin.cpp @@ -329,8 +329,8 @@ public: enum eEnums { SPELL_EXPLODE_CRYSTAL = 62487, - SPELL_FLAMES = 64561, - + SPELL_FLAMES = 64561, + SAY_WP_7 = -1800047, SAY_WP_6 = -1800048, SAY_WP_5 = -1800049, @@ -350,38 +350,38 @@ public: struct npc_engineer_heliceAI : public npc_escortAI { npc_engineer_heliceAI(Creature* pCreature) : npc_escortAI(pCreature) { } - - uint32 m_uiChatTimer; + + uint32 m_uiChatTimer; void WaypointReached(uint32 i) - { + { Player* pPlayer = GetPlayerForEscort(); switch (i) { case 0: DoScriptText(SAY_WP_2, me); break; - case 1: + case 1: DoScriptText(SAY_WP_3, me); me->CastSpell(5918.33, 5372.91, -98.770, SPELL_EXPLODE_CRYSTAL, true); - me->SummonGameObject(184743, 5918.33, 5372.91, -98.770, 0, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN); //approx 3 to 4 seconds + me->SummonGameObject(184743, 5918.33, 5372.91, -98.770, 0, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN); //approx 3 to 4 seconds me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH); break; - case 2: + case 2: DoScriptText(SAY_WP_4, me); break; case 7: DoScriptText(SAY_WP_5, me); break; - case 8: + case 8: me->CastSpell(5887.37, 5379.39, -91.289, SPELL_EXPLODE_CRYSTAL, true); - me->SummonGameObject(184743, 5887.37, 5379.39, -91.289, 0, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN); //approx 3 to 4 seconds + me->SummonGameObject(184743, 5887.37, 5379.39, -91.289, 0, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN); //approx 3 to 4 seconds me->HandleEmoteCommand(EMOTE_ONESHOT_LAUGH); break; - case 9: + case 9: DoScriptText(SAY_WP_6, me); break; - case 13: + case 13: if (pPlayer) { pPlayer->GroupEventHappens(QUEST_DISASTER, me); @@ -389,20 +389,20 @@ public: } break; } - } + } void Reset() - { - m_uiChatTimer = 4000; + { + m_uiChatTimer = 4000; } void JustDied(Unit* /*pKiller*/) { Player* pPlayer = GetPlayerForEscort(); if (HasEscortState(STATE_ESCORT_ESCORTING)) { - if (pPlayer) - pPlayer->FailQuest(QUEST_DISASTER); - } + if (pPlayer) + pPlayer->FailQuest(QUEST_DISASTER); + } } void UpdateAI(const uint32 uiDiff) @@ -412,12 +412,12 @@ public: if (HasEscortState(STATE_ESCORT_ESCORTING)) { if (m_uiChatTimer <= uiDiff) - { + { m_uiChatTimer = 12000; } else m_uiChatTimer -= uiDiff; - } + } } }; @@ -428,10 +428,10 @@ public: bool OnQuestAccept(Player* pPlayer, Creature* pCreature, const Quest* pQuest) { - if (pQuest->GetQuestId() == QUEST_DISASTER) + if (pQuest->GetQuestId() == QUEST_DISASTER) { if (npc_engineer_heliceAI* pEscortAI = CAST_AI(npc_engineer_helice::npc_engineer_heliceAI, pCreature->AI())) - { + { pCreature->GetMotionMaster()->MoveJumpTo(0, 0.4, 0.4); pCreature->setFaction(113); diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp index 8d9cccd473c..9af209179a0 100644 --- a/src/server/scripts/Northrend/zuldrak.cpp +++ b/src/server/scripts/Northrend/zuldrak.cpp @@ -240,7 +240,7 @@ enum eGurgthock QUEST_AMPHITHEATER_ANGUISH_YGGDRAS_1 = 12932, QUEST_AMPHITHEATER_ANGUISH_MAGNATAUR = 12933, QUEST_AMPHITHEATER_ANGUISH_FROM_BEYOND = 12934, - + NPC_ORINOKO_TUSKBREAKER = 30020, NPC_KORRAK_BLOODRAGER = 30023, NPC_YGGDRAS = 30014, @@ -480,7 +480,7 @@ public: } break; case 10: - me->SummonCreature(NPC_YGGDRAS, SpawnPosition[1], TEMPSUMMON_CORPSE_DESPAWN, 1000); + me->SummonCreature(NPC_YGGDRAS, SpawnPosition[1], TEMPSUMMON_CORPSE_DESPAWN, 1000); DoScriptText(EMOTE_YGGDRAS_SPAWN,me); uiPhase = 0; break; @@ -511,7 +511,7 @@ public: pCreature->AI()->SetData(1,uiBossRandom); uiPhase = 0; break; - } + } }else uiTimer -= uiDiff; } } @@ -965,7 +965,7 @@ public: } } } - + if (bThunderClap && me->GetHealth()*100 / me->GetMaxHealth() <= 10) { DoCastAOE(SPELL_THUNDERCLAP); @@ -1057,7 +1057,7 @@ public: } void SummonAdds() - { + { if (!Boss[uiBossRandom].uiAdd) return; @@ -1071,7 +1071,7 @@ public: SummonList.push_back(pSummon->GetGUID()); } } - + } void EnterCombat(Unit* pUnit) @@ -1082,7 +1082,7 @@ public: if (Creature* pTemp = Unit::GetCreature(*me, *itr)) { pTemp->m_CombatDistance = 100.0f; // ugly hack? we are not in a instance sorry. :( - pTemp->AI()->AttackStart(pUnit); + pTemp->AI()->AttackStart(pUnit); } } } @@ -1109,7 +1109,7 @@ public: } } } - + if (uiElementalSpellTimer <= uiDiff) { DoCastVictim(Boss[uiBossRandom].uiSpell); @@ -1131,7 +1131,7 @@ public: pTemp->GetMotionMaster()->MoveChase(pTemp->getVictim()); } } - + bAddAttack = true; } @@ -1192,10 +1192,10 @@ public: { if (!pWho) return; - + AttackStartNoMove(pWho); } - + void SetData(uint32 uiData, uint32 uiValue) { if (uiData == 1) @@ -1207,7 +1207,7 @@ public: { if (!UpdateVictim()) return; - + if (me->GetPositionZ() >= 287.0f) if (uiMissleTimer <= uiDiff) { diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 3ce2571de4d..91b8f8758a9 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -722,10 +722,10 @@ public: void CastEyeBlast() { me->InterruptNonMeleeSpells(false); - + me->MonsterYell(SAY_EYE_BLAST, LANG_UNIVERSAL, 0); DoPlaySoundToSet(me, SOUND_EYE_BLAST); - + float distx, disty, dist[2]; for (uint8 i = 0; i < 2; ++i) { @@ -741,17 +741,17 @@ public: dist[i] = distx * distx + disty * disty; } Locations final = GlaivePosition[dist[0] < dist[1] ? 0 : 1]; - + final.x = 2 * final.x - initial.x; final.y = 2 * final.y - initial.y; - + Creature* Trigger = me->SummonCreature(23069, initial.x, initial.y, initial.z, 0, TEMPSUMMON_TIMED_DESPAWN, 13000); if (!Trigger) return; - + Trigger->SetSpeed(MOVE_WALK, 3); Trigger->AddUnitMovementFlag(MOVEMENTFLAG_WALKING); Trigger->GetMotionMaster()->MovePoint(0, final.x, final.y, final.z); - + //Trigger->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); me->SetUInt64Value(UNIT_FIELD_TARGET, Trigger->GetGUID()); DoCast(Trigger, SPELL_EYE_BLAST); @@ -760,7 +760,7 @@ public: { me->MonsterYell(SAY_SUMMONFLAMES, LANG_UNIVERSAL, 0); DoPlaySoundToSet(me, SOUND_SUMMONFLAMES); - + for (uint8 i = 0; i < 2; ++i) { if (GETUNIT(Glaive, GlaiveGUID[i])) diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp index e97c9567f4d..8d86e318008 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_broggok.cpp @@ -98,7 +98,7 @@ class boss_broggok : public CreatureScript { DoCast(me->getVictim(), SPELL_SLIME_SPRAY); AcidSpray_Timer = 4000+rand()%8000; - } + } else AcidSpray_Timer -=diff; @@ -106,16 +106,16 @@ class boss_broggok : public CreatureScript { DoCast(me->getVictim(), SPELL_POISON_BOLT); PoisonBolt_Timer = 4000+rand()%8000; - } - else + } + else PoisonBolt_Timer -=diff; if (PoisonSpawn_Timer <= diff) { DoCast(me, SPELL_POISON_CLOUD); PoisonSpawn_Timer = 20000; - } - else + } + else PoisonSpawn_Timer -=diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp index 13378233d61..73e2347fd70 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_kelidan_the_breaker.cpp @@ -228,8 +228,8 @@ class boss_kelidan_the_breaker : public CreatureScript { DoCast(me, SPELL_SHADOW_BOLT_VOLLEY); ShadowVolley_Timer = 5000+rand()%8000; - } - else + } + else ShadowVolley_Timer -=diff; if (Corruption_Timer <= diff) @@ -237,7 +237,7 @@ class boss_kelidan_the_breaker : public CreatureScript DoCast(me, SPELL_CORRUPTION); Corruption_Timer = 30000+rand()%20000; } - else + else Corruption_Timer -=diff; if (BurningNova_Timer <= diff) @@ -344,8 +344,8 @@ class mob_shadowmoon_channeler : public CreatureScript DoCast(channeled, SPELL_CHANNELING); } check_Timer = 5000; - } - else + } + else check_Timer -= diff; return; } @@ -355,16 +355,16 @@ class mob_shadowmoon_channeler : public CreatureScript if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_MARK_OF_SHADOW); MarkOfShadow_Timer = 15000+rand()%5000; - } - else + } + else MarkOfShadow_Timer -=diff; if (ShadowBolt_Timer <= diff) { DoCast(me->getVictim(), SPELL_SHADOW_BOLT); ShadowBolt_Timer = 5000+rand()%1000; - } - else + } + else ShadowBolt_Timer -=diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp index 0c8d2f48de9..fbb6d067b15 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/boss_the_maker.cpp @@ -125,8 +125,8 @@ class boss_the_maker : public CreatureScript if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(pTarget, SPELL_EXPLODING_BREAKER); ExplodingBreaker_Timer = 4000+rand()%8000; - } - else + } + else ExplodingBreaker_Timer -=diff; /* // Disabled until Core Support for mind control @@ -145,8 +145,8 @@ class boss_the_maker : public CreatureScript { DoCast(me->getVictim(), SPELL_KNOCKDOWN); Knockdown_Timer = 4000+rand()%8000; - } - else + } + else Knockdown_Timer -=diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp index a191d30a80f..3d01c985ffe 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_omor_the_unscarred.cpp @@ -26,7 +26,7 @@ EndScriptData */ #include "ScriptPCH.h" enum eSays -{ +{ SAY_AGGRO_1 = -1543009, SAY_AGGRO_2 = -1543010, SAY_AGGRO_3 = -1543011, @@ -38,7 +38,7 @@ enum eSays }; enum eSpells -{ +{ SPELL_ORBITAL_STRIKE = 30637, SPELL_SHADOW_WHIP = 30638, SPELL_TREACHEROUS_AURA = 30695, @@ -131,8 +131,8 @@ class boss_omor_the_unscarred : public CreatureScript me->InterruptNonMeleeSpells(false); DoCast(me, SPELL_SUMMON_FIENDISH_HOUND); Summon_Timer = 15000+rand()%15000; - } - else + } + else Summon_Timer -= diff; } @@ -152,11 +152,11 @@ class boss_omor_the_unscarred : public CreatureScript PlayerGUID = 0; ShadowWhip_Timer = 2000; CanPullBack = false; - } + } else ShadowWhip_Timer -= diff; } - else + else if (OrbitalStrike_Timer <= diff) { Unit* temp = NULL; @@ -173,8 +173,8 @@ class boss_omor_the_unscarred : public CreatureScript if (PlayerGUID) CanPullBack = true; } - } - else + } + else OrbitalStrike_Timer -= diff; if ((me->GetHealth()*100) / me->GetMaxHealth() < 20) @@ -183,8 +183,8 @@ class boss_omor_the_unscarred : public CreatureScript { DoCast(me, SPELL_DEMONIC_SHIELD); DemonicShield_Timer = 15000; - } - else + } + else DemonicShield_Timer -= diff; } @@ -197,7 +197,7 @@ class boss_omor_the_unscarred : public CreatureScript DoCast(pTarget, SPELL_TREACHEROUS_AURA); Aura_Timer = 8000+rand()%8000; } - } + } else Aura_Timer -= diff; @@ -211,8 +211,8 @@ class boss_omor_the_unscarred : public CreatureScript DoCast(pTarget, SPELL_SHADOW_BOLT); Shadowbolt_Timer = 4000+rand()%2500; } - } - else + } + else Shadowbolt_Timer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index 77fd16edce2..bbf92447624 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -85,7 +85,7 @@ class boss_nazan : public CreatureScript boss_nazanAI(Creature* pCreature) : ScriptedAI(pCreature) { VazrudenGUID = 0; - flight = true; + flight = true; } uint32 Fireball_Timer; @@ -102,7 +102,7 @@ class boss_nazan : public CreatureScript Fireball_Timer = 4000; Fly_Timer = 45000; Turn_Timer = 0; - } + } void EnterCombat(Unit* /*who*/) {} @@ -133,8 +133,8 @@ class boss_nazan : public CreatureScript if (Unit* pVictim = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(pVictim, DUNGEON_MODE(SPELL_FIREBALL, SPELL_FIREBALL_H), true); Fireball_Timer = urand(4000,7000); - } - else + } + else Fireball_Timer -= diff; if (flight) // phase 1 - the flight @@ -144,7 +144,7 @@ class boss_nazan : public CreatureScript { flight = false; BellowingRoar_Timer = 6000; - ConeOfFire_Timer = 12000; + ConeOfFire_Timer = 12000; me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); me->AddUnitMovementFlag(MOVEMENTFLAG_WALKING); me->GetMotionMaster()->Clear(); @@ -174,8 +174,8 @@ class boss_nazan : public CreatureScript DoCast(me, DUNGEON_MODE(SPELL_CONE_OF_FIRE, SPELL_CONE_OF_FIRE_H)); ConeOfFire_Timer = 12000; Fireball_Timer = 4000; - } - else + } + else ConeOfFire_Timer -= diff; if (IsHeroic()) @@ -183,8 +183,8 @@ class boss_nazan : public CreatureScript { DoCast(me, SPELL_BELLOWING_ROAR); BellowingRoar_Timer = 45000; - } - else + } + else BellowingRoar_Timer -= diff; DoMeleeAttackIfReady(); @@ -252,8 +252,8 @@ class boss_vazruden : public CreatureScript WipeSaid = true; } me->DisappearAndDie(); - } - else + } + else UnsummonCheck -= diff; return; } @@ -263,8 +263,8 @@ class boss_vazruden : public CreatureScript if (Unit *victim = me->getVictim()) DoCast(victim, DUNGEON_MODE(SPELL_REVENGE,SPELL_REVENGE_H)); Revenge_Timer = 5000; - } - else + } + else Revenge_Timer -= diff; DoMeleeAttackIfReady(); @@ -308,7 +308,7 @@ class boss_vazruden_the_herald : public CreatureScript phase = 0; waypoint = 0; check = 0; - UnsummonAdds(); + UnsummonAdds(); } void UnsummonAdds() @@ -344,8 +344,8 @@ class boss_vazruden_the_herald : public CreatureScript { if (Creature* Vazruden = me->SummonCreature(ENTRY_VAZRUDEN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000)) VazrudenGUID = Vazruden->GetGUID(); - if (Creature* Nazan = me->SummonCreature(ENTRY_NAZAN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000)) - NazanGUID = Nazan->GetGUID(); + if (Creature* Nazan = me->SummonCreature(ENTRY_NAZAN,VazrudenMiddle[0],VazrudenMiddle[1],VazrudenMiddle[2],0,TEMPSUMMON_CORPSE_TIMED_DESPAWN,6000000)) + NazanGUID = Nazan->GetGUID(); summoned = true; me->SetVisibility(VISIBILITY_OFF); me->addUnitState(UNIT_STAT_ROOT); @@ -371,11 +371,11 @@ class boss_vazruden_the_herald : public CreatureScript { CAST_AI(boss_nazan::boss_nazanAI, pSummoned->AI())->VazrudenGUID = VazrudenGUID; pSummoned->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); - pSummoned->SetSpeed(MOVE_FLIGHT, 2.5); + pSummoned->SetSpeed(MOVE_FLIGHT, 2.5); if (pVictim) AttackStartNoMove(pVictim); } - else + else if (pVictim) pSummoned->AI()->AttackStart(pVictim); } @@ -413,8 +413,8 @@ class boss_vazruden_the_herald : public CreatureScript phase = 2; return; } - } - else + } + else check -= diff; break; default: // adds do the job now @@ -440,8 +440,8 @@ class boss_vazruden_the_herald : public CreatureScript //me->Kill(me); } check = 2000; - } - else + } + else check -= diff; break; } @@ -491,8 +491,8 @@ class mob_hellfire_sentry : public CreatureScript if (Unit *victim = me->getVictim()) DoCast(victim, SPELL_KIDNEY_SHOT); KidneyShot_Timer = 20000; - } - else + } + else KidneyShot_Timer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp index 509650cd5c6..645a65bdee2 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_watchkeeper_gargolmar.cpp @@ -124,7 +124,7 @@ class boss_watchkeeper_gargolmar : public CreatureScript DoCast(me->getVictim(), SPELL_MORTAL_WOUND); MortalWound_Timer = 5000+rand()%8000; } - else + else MortalWound_Timer -= diff; if (Surge_Timer <= diff) @@ -135,8 +135,8 @@ class boss_watchkeeper_gargolmar : public CreatureScript DoCast(pTarget, SPELL_SURGE); Surge_Timer = 5000+rand()%8000; - } - else + } + else Surge_Timer -= diff; if ((me->GetHealth()*100) / me->GetMaxHealth() < 20) @@ -146,7 +146,7 @@ class boss_watchkeeper_gargolmar : public CreatureScript DoCast(me, SPELL_RETALIATION); Retaliation_Timer = 30000; } - else + else Retaliation_Timer -= diff; } diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp index b9d8c7683e1..cea3716a1fb 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/instance_hellfire_ramparts.cpp @@ -32,7 +32,7 @@ class instance_ramparts : public InstanceMapScript instance_ramparts() : InstanceMapScript("instance_ramparts") { - } + } struct instance_ramparts_InstanceMapScript : public InstanceScript { @@ -54,11 +54,11 @@ class instance_ramparts : public InstanceMapScript { switch(pGo->GetEntry()) { - case 185168: - m_uiChestNGUID = pGo->GetGUID(); + case 185168: + m_uiChestNGUID = pGo->GetGUID(); break; - case 185169: - m_uiChestHGUID = pGo->GetGUID(); + case 185169: + m_uiChestHGUID = pGo->GetGUID(); break; } } diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp index 0a1e11324d9..8a27461723b 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/boss_magtheridon.cpp @@ -147,11 +147,11 @@ class mob_abyssal : public CreatureScript } } - void EnterCombat(Unit* /*who*/) + void EnterCombat(Unit* /*who*/) { DoZoneInCombat(); } - void AttackStart(Unit *who) + void AttackStart(Unit *who) { if (!trigger) ScriptedAI::AttackStart(who); @@ -181,7 +181,7 @@ class mob_abyssal : public CreatureScript if (Despawn_Timer <= diff) { me->ForcedDespawn(); - } + } else Despawn_Timer -= diff; if (!UpdateVictim()) @@ -191,7 +191,7 @@ class mob_abyssal : public CreatureScript { DoCast(me->getVictim(), SPELL_FIRE_BLAST); FireBlast_Timer = 5000+rand()%10000; - } + } else FireBlast_Timer -= diff; DoMeleeAttackIfReady(); @@ -312,7 +312,7 @@ class boss_magtheridon : public CreatureScript { DebuffClicker(clicker); (*i).second = 0; - } + } else ++ClickerNum; } @@ -323,11 +323,11 @@ class boss_magtheridon : public CreatureScript DoScriptText(SAY_BANISH, me); DoCast(me, SPELL_SHADOW_CAGE, true); } - else + else if (ClickerNum < CLICKERS_COUNT && me->HasAura(SPELL_SHADOW_CAGE)) me->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE); - if (!ClickerNum) + if (!ClickerNum) NeedCheckCube = false; } @@ -372,8 +372,8 @@ class boss_magtheridon : public CreatureScript { DoScriptText(RandomTaunt[rand()%6].id, me); RandChat_Timer = 90000; - } - else + } + else RandChat_Timer -= diff; } @@ -387,15 +387,15 @@ class boss_magtheridon : public CreatureScript DoCast(me, SPELL_BERSERK, true); DoScriptText(EMOTE_BERSERK, me); Berserk_Timer = 60000; - } - else + } + else Berserk_Timer -= diff; if (Cleave_Timer <= diff) { DoCast(me->getVictim(), SPELL_CLEAVE); Cleave_Timer = 10000; - } + } else Cleave_Timer -= diff; @@ -409,7 +409,7 @@ class boss_magtheridon : public CreatureScript BlastNova_Timer = 60000; } } - else + else BlastNova_Timer -= diff; if (Quake_Timer <= diff) @@ -420,7 +420,7 @@ class boss_magtheridon : public CreatureScript DoCast(me, SPELL_QUAKE_TRIGGER, true); Quake_Timer = 50000; } - } + } else Quake_Timer -= diff; @@ -440,7 +440,7 @@ class boss_magtheridon : public CreatureScript } Blaze_Timer = 20000 + rand()%20000; } - else + else Blaze_Timer -= diff; if (!Phase3 && me->GetHealth()*10 < me->GetMaxHealth()*3 @@ -465,12 +465,12 @@ class boss_magtheridon : public CreatureScript float x, y, z; pTarget->GetPosition(x, y, z); Creature *summon = me->SummonCreature(MOB_ABYSSAL, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0); - if (summon) + if (summon) CAST_AI(mob_abyssal::mob_abyssalAI, summon->AI())->SetTrigger(1); } Debris_Timer = 10000; - } - else + } + else Debris_Timer -= diff; } @@ -562,7 +562,7 @@ class mob_hellfire_channeler : public CreatureScript { DoCast(me, SPELL_SHADOW_BOLT_VOLLEY); ShadowBoltVolley_Timer = 10000 + rand()%10000; - } + } else ShadowBoltVolley_Timer -= diff; @@ -580,8 +580,8 @@ class mob_hellfire_channeler : public CreatureScript if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1)) DoCast(pTarget, SPELL_FEAR); Fear_Timer = 25000 + rand()%15000; - } - else + } + else Fear_Timer -= diff; if (Infernal_Timer <= diff) @@ -589,8 +589,8 @@ class mob_hellfire_channeler : public CreatureScript if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) DoCast(pTarget, SPELL_BURNING_ABYSSAL, true); Infernal_Timer = 30000 + rand()%10000; - } - else + } + else Infernal_Timer -= diff; DoMeleeAttackIfReady(); @@ -607,7 +607,7 @@ class mob_hellfire_channeler : public CreatureScript class go_manticron_cube : public GameObjectScript { public: - go_manticron_cube() : GameObjectScript("go_manticron_cube") + go_manticron_cube() : GameObjectScript("go_manticron_cube") { } @@ -617,13 +617,13 @@ public: if (!pInstance) return true; - - if (pInstance->GetData(DATA_MAGTHERIDON_EVENT) != IN_PROGRESS) + + if (pInstance->GetData(DATA_MAGTHERIDON_EVENT) != IN_PROGRESS) return true; Creature *Magtheridon =Unit::GetCreature(*pGO, pInstance->GetData64(DATA_MAGTHERIDON)); - if (!Magtheridon || !Magtheridon->isAlive()) + if (!Magtheridon || !Magtheridon->isAlive()) return true; - + // if exhausted or already channeling return if (pPlayer->HasAura(SPELL_MIND_EXHAUSTION) || pPlayer->HasAura(SPELL_SHADOW_GRASP)) return true; diff --git a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp index 5b73727bd78..fd48ece5a4d 100644 --- a/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/MagtheridonsLair/instance_magtheridons_lair.cpp @@ -29,7 +29,7 @@ EndScriptData */ enum eSpells { SPELL_SOUL_TRANSFER = 30531, // core bug, does not support target 7 - SPELL_BLAZE_TARGET = 30541, // core bug, does not support target 7 + SPELL_BLAZE_TARGET = 30541, // core bug, does not support target 7 }; #define CHAMBER_CENTER_X -15.14 diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp index 9d773f6da55..ed1b60d6a1d 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_nethekurse.cpp @@ -53,7 +53,7 @@ static Say PeonDies[]= }; enum eSays -{ +{ SAY_INTRO = -1540000, SAY_TAUNT_1 = -1540009, SAY_TAUNT_2 = -1540010, @@ -67,7 +67,7 @@ enum eSays }; enum eSpells -{ +{ SPELL_DEATH_COIL = 30500, SPELL_DARK_SPIN = 30502, // core bug spell attack caster :D SPELL_SHADOW_FISSURE = 30496, // Summon the ShadowFissure NPC @@ -269,8 +269,8 @@ class boss_grand_warlock_nethekurse : public CreatureScript { DoCast(me->getVictim(), SPELL_SHADOW_CLEAVE); Cleave_Timer = 6000+rand()%2500; - } - else + } + else Cleave_Timer -= diff; } else @@ -280,8 +280,8 @@ class boss_grand_warlock_nethekurse : public CreatureScript if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(pTarget, SPELL_SHADOW_FISSURE); ShadowFissure_Timer = urand(7500,15000); - } - else + } + else ShadowFissure_Timer -= diff; if (DeathCoil_Timer <= diff) @@ -289,8 +289,8 @@ class boss_grand_warlock_nethekurse : public CreatureScript if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,0)) DoCast(pTarget, SPELL_DEATH_COIL); DeathCoil_Timer = urand(15000,20000); - } - else + } + else DeathCoil_Timer -= diff; if ((me->GetHealth()*100) / me->GetMaxHealth() <= 20) diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp index a4971acbc9d..1573180e827 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warbringer_omrogg.cpp @@ -367,7 +367,7 @@ class boss_warbringer_omrogg : public CreatureScript if (BlastCount == 3) BlastCount = 0; } - else + else BlastWave_Timer -= diff; if (BurningMaul_Timer <= diff) @@ -377,8 +377,8 @@ class boss_warbringer_omrogg : public CreatureScript BurningMaul_Timer = 40000; BlastWave_Timer = 16000; BlastCount = 1; - } - else + } + else BurningMaul_Timer -= diff; if (ResetThreat_Timer <= diff) @@ -390,7 +390,7 @@ class boss_warbringer_omrogg : public CreatureScript me->AddThreat(pTarget, 0.0f); } ResetThreat_Timer = 25000+rand()%15000; - } + } else ResetThreat_Timer -= diff; @@ -398,7 +398,7 @@ class boss_warbringer_omrogg : public CreatureScript { DoCast(me, SPELL_FEAR); Fear_Timer = 15000+rand()%20000; - } + } else Fear_Timer -= diff; @@ -407,7 +407,7 @@ class boss_warbringer_omrogg : public CreatureScript DoCast(me, SPELL_THUNDERCLAP); ThunderClap_Timer = 15000+rand()%15000; } - else + else ThunderClap_Timer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp index c2d9c95e7f4..40567bbcc6f 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/boss_warchief_kargath_bladefist.cpp @@ -30,7 +30,7 @@ EndContentData */ #include "ScriptPCH.h" enum eSays -{ +{ SAY_AGGRO1 = -1540042, SAY_AGGRO2 = -1540043, SAY_AGGRO3 = -1540044, @@ -208,7 +208,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript SpawnAssassin(); Assassins_Timer = 0; } - else + else Assassins_Timer -= diff; if (InBlade) @@ -239,7 +239,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript Wait_Timer = 0; } } - else + else Wait_Timer -= diff; } else @@ -253,8 +253,8 @@ class boss_warchief_kargath_bladefist : public CreatureScript Blade_Dance_Timer = 0; me->SetSpeed(MOVE_RUN,4); return; - } - else + } + else Blade_Dance_Timer -= diff; if (Charge_timer) @@ -263,7 +263,7 @@ class boss_warchief_kargath_bladefist : public CreatureScript DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), H_SPELL_CHARGE); Charge_timer = 0; } - else + else Charge_timer -= diff; if (Summon_Assistant_Timer <= diff) @@ -273,20 +273,20 @@ class boss_warchief_kargath_bladefist : public CreatureScript switch (urand(0,2)) { case 0: - me->SummonCreature(MOB_HEARTHEN_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); + me->SummonCreature(MOB_HEARTHEN_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break; - case 1: - me->SummonCreature(MOB_SHARPSHOOTER_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); + case 1: + me->SummonCreature(MOB_SHARPSHOOTER_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break; case 2: - me->SummonCreature(MOB_REAVER_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); + me->SummonCreature(MOB_REAVER_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break; } } if (urand(0,9) < 2) ++summoned; Summon_Assistant_Timer = urand(25000,35000); - } + } else Summon_Assistant_Timer -= diff; @@ -304,8 +304,8 @@ class boss_warchief_kargath_bladefist : public CreatureScript return; } resetcheck_timer = 5000; - } - else + } + else resetcheck_timer -= diff; } }; diff --git a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp index 4754bea9315..91b05c0c227 100644 --- a/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/ShatteredHalls/instance_shattered_halls.cpp @@ -57,8 +57,8 @@ class instance_shattered_halls : public InstanceMapScript { switch(pGo->GetEntry()) { - case DOOR_NETHEKURSE: - nethekurseDoorGUID = pGo->GetGUID(); + case DOOR_NETHEKURSE: + nethekurseDoorGUID = pGo->GetGUID(); break; } } @@ -67,8 +67,8 @@ class instance_shattered_halls : public InstanceMapScript { switch(pCreature->GetEntry()) { - case 16807: - nethekurseGUID = pCreature->GetGUID(); + case 16807: + nethekurseGUID = pCreature->GetGUID(); break; } } diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index ac5732d4927..7b6fa319cec 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -219,8 +219,8 @@ class boss_alar : public CreatureScript { DoCast(me, SPELL_BERSERK, true); Berserk_Timer = 60000; - } - else + } + else Berserk_Timer -= diff; if (ForceMove) @@ -229,8 +229,8 @@ class boss_alar : public CreatureScript { me->GetMotionMaster()->MovePoint(0, waypoint[cur_wp][0], waypoint[cur_wp][1], waypoint[cur_wp][2]); ForceTimer = 5000; - } - else + } + else ForceTimer -= diff; } @@ -319,8 +319,8 @@ class boss_alar : public CreatureScript WaitEvent = WE_NONE; WaitTimer = 0; - } - else + } + else WaitTimer -= diff; } return; @@ -363,8 +363,8 @@ class boss_alar : public CreatureScript me->GetMotionMaster()->MovePoint(0, waypoint[cur_wp][0], waypoint[cur_wp][1], waypoint[cur_wp][2]); WaitTimer = 0; return; - } - else + } + else Platforms_Move_Timer -= diff; } else @@ -376,14 +376,14 @@ class boss_alar : public CreatureScript DoCast(pTarget, SPELL_CHARGE); Charge_Timer = 30000; } - else + else Charge_Timer -= diff; if (MeltArmor_Timer <= diff) { DoCast(me->getVictim(), SPELL_MELT_ARMOR); MeltArmor_Timer = 60000; - } + } else MeltArmor_Timer -= diff; @@ -397,8 +397,8 @@ class boss_alar : public CreatureScript WaitTimer = 0; DiveBomb_Timer = 40000+rand()%5000; return; - } - else + } + else DiveBomb_Timer -= diff; if (FlamePatch_Timer <= diff) @@ -417,8 +417,8 @@ class boss_alar : public CreatureScript } } FlamePatch_Timer = 30000; - } - else + } + else FlamePatch_Timer -= diff; } @@ -477,15 +477,15 @@ class mob_ember_of_alar : public CreatureScript InstanceScript *pInstance; bool toDie; - void Reset() + void Reset() { toDie = false; } - void EnterCombat(Unit * /*who*/) + void EnterCombat(Unit * /*who*/) { DoZoneInCombat(); } - void EnterEvadeMode() + void EnterEvadeMode() { me->setDeathState(JUST_DIED); } diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp index 1326f11e187..b819b9304e8 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_astromancer.cpp @@ -79,7 +79,7 @@ class boss_high_astromancer_solarian : public CreatureScript : CreatureScript("boss_high_astromancer_solarian") { } - + struct boss_high_astromancer_solarianAI : public ScriptedAI { boss_high_astromancer_solarianAI(Creature* pCreature) : ScriptedAI(pCreature), Summons(me) @@ -197,7 +197,7 @@ class boss_high_astromancer_solarian : public CreatureScript if (!UpdateVictim()) return; if (AppearDelay) - { + { me->StopMoving(); me->AttackStop(); if (AppearDelay_Timer <= diff) @@ -228,7 +228,7 @@ class boss_high_astromancer_solarian : public CreatureScript me->InterruptNonMeleeSpells(false); if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true)) DoCast(pTarget, SPELL_WRATH_OF_THE_ASTROMANCER, true); - Wrath_Timer = 20000+rand()%5000; + Wrath_Timer = 20000+rand()%5000; } else Wrath_Timer -= diff; @@ -249,8 +249,8 @@ class boss_high_astromancer_solarian : public CreatureScript DoCast(pTarget, SPELL_ARCANE_MISSILES); } ArcaneMissiles_Timer = 3000; - } - else + } + else ArcaneMissiles_Timer -= diff; if (m_uiWrathOfTheAstromancer_Timer <= diff) @@ -268,7 +268,7 @@ class boss_high_astromancer_solarian : public CreatureScript m_uiWrathOfTheAstromancer_Timer = 1000; } } - else + else m_uiWrathOfTheAstromancer_Timer -= diff; //Phase1_Timer @@ -311,8 +311,8 @@ class boss_high_astromancer_solarian : public CreatureScript } } AppearDelay = true; - } - else + } + else Phase1_Timer-=diff; } else @@ -334,9 +334,9 @@ class boss_high_astromancer_solarian : public CreatureScript else Phase2_Timer -= diff; } - else + else if (Phase == 3) - { + { me->AttackStop(); me->StopMoving(); //Check Phase3_Timer @@ -344,7 +344,7 @@ class boss_high_astromancer_solarian : public CreatureScript { Phase = 1; //15 seconds later Solarian reappears out of one of the 3 portals. Simultaneously, 2 healers appear in the two other portals. - int i = rand()%3; + int i = rand()%3; me->GetMotionMaster()->Clear(); me->GetMap()->CreatureRelocation(me, Portals[i][0], Portals[i][1], Portals[i][2], CENTER_O); @@ -358,7 +358,7 @@ class boss_high_astromancer_solarian : public CreatureScript DoScriptText(SAY_SUMMON2, me); AppearDelay = true; Phase3_Timer = 15000; - } + } else Phase3_Timer -= diff; } @@ -370,7 +370,7 @@ class boss_high_astromancer_solarian : public CreatureScript { DoCast(me, SPELL_FEAR); Fear_Timer = 20000; - } + } else Fear_Timer -= diff; //VoidBolt_Timer @@ -413,7 +413,7 @@ class mob_solarium_priest : public CreatureScript : CreatureScript("mob_solarium_priest") { } - + struct mob_solarium_priestAI : public ScriptedAI { mob_solarium_priestAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -463,23 +463,23 @@ class mob_solarium_priest : public CreatureScript healTimer = 9000; } } - else + else healTimer -= diff; if (holysmiteTimer <= diff) { DoCast(me->getVictim(), SPELL_SOLARIUM_HOLY_SMITE); holysmiteTimer = 4000; - } - else + } + else holysmiteTimer -= diff; if (aoesilenceTimer <= diff) { DoCast(me->getVictim(), SPELL_SOLARIUM_ARCANE_TORRENT); aoesilenceTimer = 13000; - } - else + } + else aoesilenceTimer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index c59dca949ca..2cefe09f750 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -644,7 +644,7 @@ class boss_kaelthas : public CreatureScript if (Phase_Timer <= diff) { PhaseSubphase = 1; - } + } else Phase_Timer -= diff; } @@ -672,8 +672,8 @@ class boss_kaelthas : public CreatureScript m_pInstance->SetData(DATA_KAELTHASEVENT, 3); Phase = 3; PhaseSubphase = 0; - } - else + } + else Phase_Timer -= diff; } } @@ -719,8 +719,8 @@ class boss_kaelthas : public CreatureScript AttackStart(pTarget); Phase_Timer = 30000; - } - else + } + else Phase_Timer -= diff; } break; @@ -757,7 +757,7 @@ class boss_kaelthas : public CreatureScript IsCastingFireball = false; Fireball_Timer = 5000+rand()%10000; } - } + } else Fireball_Timer -= diff; @@ -766,8 +766,8 @@ class boss_kaelthas : public CreatureScript { DoCast(me->getVictim(), SPELL_ARCANE_DISRUPTION, true); ArcaneDisruption_Timer = 60000; - } - else + } + else ArcaneDisruption_Timer -= diff; if (FlameStrike_Timer <= diff) @@ -776,8 +776,8 @@ class boss_kaelthas : public CreatureScript DoCast(pUnit, SPELL_FLAME_STRIKE); FlameStrike_Timer = 30000; - } - else + } + else FlameStrike_Timer -= diff; if (MindControl_Timer <= diff) @@ -790,8 +790,8 @@ class boss_kaelthas : public CreatureScript } MindControl_Timer = 60000; - } - else + } + else MindControl_Timer -= diff; } @@ -802,8 +802,8 @@ class boss_kaelthas : public CreatureScript DoScriptText(RAND(SAY_SUMMON_PHOENIX1,SAY_SUMMON_PHOENIX2), me); Phoenix_Timer = 60000; - } - else + } + else Phoenix_Timer -= diff; //Phase 4 specific spells @@ -836,8 +836,8 @@ class boss_kaelthas : public CreatureScript ChainPyros = true; PyrosCasted = 0; ShockBarrier_Timer = 60000; - } - else + } + else ShockBarrier_Timer -= diff; //Chain Pyros (3 of them max) @@ -869,7 +869,7 @@ class boss_kaelthas : public CreatureScript me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); Phase = 6; AttackStart(me->getVictim()); - } + } else Phase_Timer -= diff; } @@ -978,7 +978,7 @@ class boss_kaelthas : public CreatureScript DoCast(me, SPELL_SHOCK_BARRIER); ShockBarrier_Timer = 20000; } - else + else ShockBarrier_Timer -= diff; //NetherBeam_Timer @@ -1073,7 +1073,7 @@ class boss_thaladred_the_darkener : public CreatureScript Gaze_Timer = 8500; } } - else + else Gaze_Timer -= diff; //Silence_Timer @@ -1251,7 +1251,7 @@ class boss_grand_astromancer_capernian : public CreatureScript DoScriptText(SAY_CAPERNIAN_AGGRO, me); Yell = true; } - else + else Yell_Timer -= diff; } @@ -1260,8 +1260,8 @@ class boss_grand_astromancer_capernian : public CreatureScript { DoCast(me->getVictim(), SPELL_CAPERNIAN_FIREBALL); Fireball_Timer = 4000; - } - else + } + else Fireball_Timer -= diff; //Conflagration_Timer @@ -1276,8 +1276,8 @@ class boss_grand_astromancer_capernian : public CreatureScript DoCast(me->getVictim(), SPELL_CONFLAGRATION); Conflagration_Timer = 10000+rand()%5000; - } - else + } + else Conflagration_Timer -= diff; //ArcaneExplosion_Timer @@ -1302,8 +1302,8 @@ class boss_grand_astromancer_capernian : public CreatureScript DoCast(pTarget, SPELL_ARCANE_EXPLOSION); ArcaneExplosion_Timer = 4000+rand()%2000; - } - else + } + else ArcaneExplosion_Timer -= diff; //Do NOT deal any melee damage. @@ -1374,8 +1374,8 @@ class boss_master_engineer_telonicus : public CreatureScript { DoCast(me->getVictim(), SPELL_BOMB); Bomb_Timer = 25000; - } - else + } + else Bomb_Timer -= diff; //RemoteToy_Timer @@ -1385,7 +1385,7 @@ class boss_master_engineer_telonicus : public CreatureScript DoCast(pTarget, SPELL_REMOTE_TOY); RemoteToy_Timer = 10000+rand()%5000; - } + } else RemoteToy_Timer -= diff; @@ -1445,14 +1445,14 @@ class mob_kael_flamestrike : public CreatureScript { me->InterruptNonMeleeSpells(false); DoCast(me, SPELL_FLAME_STRIKE_DMG); - } - else + } + else me->Kill(me); KillSelf = true; Timer = 1000; - } - else + } + else Timer -= diff; } }; @@ -1503,8 +1503,8 @@ class mob_phoenix_tk : public CreatureScript if (me->GetHealth() > dmg) me->SetHealth(uint32(me->GetHealth()-dmg)); Cycle_Timer = 2000; - } - else + } + else Cycle_Timer -= diff; DoMeleeAttackIfReady(); @@ -1567,8 +1567,8 @@ class mob_phoenix_egg_tk : public CreatureScript { me->SummonCreature(NPC_PHOENIX,me->GetPositionX(),me->GetPositionY(),me->GetPositionZ(),me->GetOrientation(),TEMPSUMMON_CORPSE_DESPAWN,5000); Rebirth_Timer = 0; - } - else + } + else Rebirth_Timer -= diff; } }; diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp index 0e9e81b3b24..1048fa95424 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_void_reaver.cpp @@ -50,7 +50,7 @@ class boss_void_reaver : public CreatureScript : CreatureScript("boss_void_reaver") { } - + struct boss_void_reaverAI : public ScriptedAI { boss_void_reaverAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -113,7 +113,7 @@ class boss_void_reaver : public CreatureScript DoScriptText(RAND(SAY_POUNDING1,SAY_POUNDING2), me); Pounding_Timer = 15000; //cast time(3000) + cooldown time(12000) } - else + else Pounding_Timer -= diff; // Arcane Orb if (ArcaneOrb_Timer <= diff) @@ -154,16 +154,16 @@ class boss_void_reaver : public CreatureScript if (DoGetThreat(me->getVictim())) DoModifyThreatPercent(me->getVictim(),-25); KnockAway_Timer = 30000; - } - else + } + else KnockAway_Timer -= diff; //Berserk if (Berserk_Timer < diff && !Enraged) { DoCast(me, SPELL_BERSERK); Enraged = true; - } - else + } + else Berserk_Timer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp index 7e717b204c5..a10e864de54 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/instance_the_eye.cpp @@ -42,7 +42,7 @@ class instance_mechanar : public InstanceMapScript : InstanceMapScript("instance_mechanar") { } - + struct instance_the_eye_InstanceMapScript : public InstanceScript { instance_the_eye_InstanceMapScript(Map* pMap) : InstanceScript(pMap) {Initialize();}; @@ -87,30 +87,30 @@ class instance_mechanar : public InstanceMapScript { switch(pCreature->GetEntry()) { - case 20064: - ThaladredTheDarkener = pCreature->GetGUID(); + case 20064: + ThaladredTheDarkener = pCreature->GetGUID(); break; - case 20063: - MasterEngineerTelonicus = pCreature->GetGUID(); + case 20063: + MasterEngineerTelonicus = pCreature->GetGUID(); break; - case 20062: - GrandAstromancerCapernian = pCreature->GetGUID(); + case 20062: + GrandAstromancerCapernian = pCreature->GetGUID(); break; - case 20060: - LordSanguinar = pCreature->GetGUID(); + case 20060: + LordSanguinar = pCreature->GetGUID(); break; - case 19622: - Kaelthas = pCreature->GetGUID(); + case 19622: + Kaelthas = pCreature->GetGUID(); break; - case 18805: - Astromancer = pCreature->GetGUID(); + case 18805: + Astromancer = pCreature->GetGUID(); break; - case 19514: - Alar = pCreature->GetGUID(); + case 19514: + Alar = pCreature->GetGUID(); break; } } - + uint64 GetData64(uint32 identifier) { switch(identifier) @@ -130,19 +130,19 @@ class instance_mechanar : public InstanceMapScript { switch(type) { - case DATA_ALAREVENT: - AlarEventPhase = data; - m_auiEncounter[0] = data; + case DATA_ALAREVENT: + AlarEventPhase = data; + m_auiEncounter[0] = data; break; - case DATA_HIGHASTROMANCERSOLARIANEVENT: - m_auiEncounter[1] = data; + case DATA_HIGHASTROMANCERSOLARIANEVENT: + m_auiEncounter[1] = data; break; - case DATA_VOIDREAVEREVENT: - m_auiEncounter[2] = data; + case DATA_VOIDREAVEREVENT: + m_auiEncounter[2] = data; break; - case DATA_KAELTHASEVENT: - KaelthasEventPhase = data; - m_auiEncounter[3] = data; + case DATA_KAELTHASEVENT: + KaelthasEventPhase = data; + m_auiEncounter[3] = data; break; } if (data == DONE) @@ -184,7 +184,7 @@ class instance_mechanar : public InstanceMapScript return; } OUT_LOAD_INST_DATA(in); - + std::istringstream stream(in); stream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) diff --git a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp index 8402f220e62..22a0c6ca899 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/the_eye.cpp @@ -56,7 +56,7 @@ class mob_crystalcore_devastator : public CreatureScript Countercharge_Timer = 9000; Knockaway_Timer = 25000; } - + void EnterCombat(Unit * /*who*/) { } @@ -83,7 +83,7 @@ class mob_crystalcore_devastator : public CreatureScript Knockaway_Timer = 23000; } - else + else Knockaway_Timer -= diff; //Countercharge_Timer @@ -91,8 +91,8 @@ class mob_crystalcore_devastator : public CreatureScript { DoCast(me, SPELL_COUNTERCHARGE); Countercharge_Timer = 45000; - } - else + } + else Countercharge_Timer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp index 6f7855e069a..d7d5fd1c282 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_gatewatcher_ironhand.cpp @@ -103,8 +103,8 @@ class boss_gatewatcher_iron_hand : public CreatureScript { DoCast(me, SPELL_SHADOW_POWER); Shadow_Power_Timer = 20000 + rand()%8000; - } - else + } + else Shadow_Power_Timer -= diff; //Jack Hammer @@ -120,8 +120,8 @@ class boss_gatewatcher_iron_hand : public CreatureScript DoScriptText(RAND(SAY_HAMMER_1,SAY_HAMMER_2), me); Jackhammer_Timer = 30000; - } - else + } + else Jackhammer_Timer -= diff; //Stream of Machine Fluid @@ -129,8 +129,8 @@ class boss_gatewatcher_iron_hand : public CreatureScript { DoCast(me->getVictim(), SPELL_STREAM_OF_MACHINE_FLUID); Stream_of_Machine_Fluid_Timer = 35000 + rand()%15000; - } - else + } + else Stream_of_Machine_Fluid_Timer -= diff; DoMeleeAttackIfReady(); @@ -140,7 +140,7 @@ class boss_gatewatcher_iron_hand : public CreatureScript CreatureAI* GetAI(Creature* creature) const { return new boss_gatewatcher_iron_handAI(creature); - } + } }; void AddSC_boss_gatewatcher_iron_hand() diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp index 083842fd638..ac7ced2b89b 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_nethermancer_sepethrea.cpp @@ -45,7 +45,7 @@ enum eSpells SPELL_DRAGONS_BREATH = 35250, SPELL_KNOCKBACK = 37317, SPELL_SOLARBURN = 35267, - H_SPELL_SUMMON_RAGIN_FLAMES = 39084, + H_SPELL_SUMMON_RAGIN_FLAMES = 39084, SPELL_INFERNO = 35268, H_SPELL_INFERNO = 39346, SPELL_FIRE_TAIL = 35278, @@ -65,15 +65,15 @@ class boss_nethermancer_sepethrea : public CreatureScript { pInstance = pCreature->GetInstanceScript(); } - + InstanceScript *pInstance; - + uint32 frost_attack_Timer; uint32 arcane_blast_Timer; uint32 dragons_breath_Timer; uint32 knockback_Timer; uint32 solarburn_Timer; - + void Reset() { frost_attack_Timer = 7000 + rand()%3000; @@ -121,17 +121,17 @@ class boss_nethermancer_sepethrea : public CreatureScript DoCast(me->getVictim(), SPELL_FROST_ATTACK); frost_attack_Timer = 7000 + rand()%3000; - } - else + } + else frost_attack_Timer -= diff; - //Arcane Blast + //Arcane Blast if (arcane_blast_Timer <= diff) { DoCast(me->getVictim(), SPELL_ARCANE_BLAST); arcane_blast_Timer = 15000; - } - else + } + else arcane_blast_Timer -= diff; //Dragons Breath if (dragons_breath_Timer <= diff) @@ -143,8 +143,8 @@ class boss_nethermancer_sepethrea : public CreatureScript DoScriptText(RAND(SAY_DRAGONS_BREATH_1,SAY_DRAGONS_BREATH_2), me); } dragons_breath_Timer = 12000 + rand()%10000; - } - else + } + else dragons_breath_Timer -= diff; //Knockback @@ -152,8 +152,8 @@ class boss_nethermancer_sepethrea : public CreatureScript { DoCast(me->getVictim(), SPELL_KNOCKBACK); knockback_Timer = 15000 + rand()%10000; - } - else + } + else knockback_Timer -= diff; //Solarburn @@ -161,13 +161,13 @@ class boss_nethermancer_sepethrea : public CreatureScript { DoCast(me->getVictim(), SPELL_SOLARBURN); solarburn_Timer = 30000; - } - else + } + else solarburn_Timer -= diff; DoMeleeAttackIfReady(); } - }; + }; CreatureAI* GetAI(Creature* creature) const { @@ -259,7 +259,7 @@ class mob_ragin_flames : public CreatureScript CreatureAI* GetAI(Creature* creature) const { return new mob_ragin_flamesAI(creature); - } + } }; void AddSC_boss_nethermancer_sepethrea() { diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp index eae3b0ff1d9..a1da2ab0d03 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp @@ -45,7 +45,7 @@ enum eSpells H_SPELL_ARCANE_EXPLOSION = 15453, SPELL_FRENZY = 36992, //Spells work, but not implemented - SPELL_SUMMON_NETHER_WRAITH_1 = 35285, + SPELL_SUMMON_NETHER_WRAITH_1 = 35285, SPELL_SUMMON_NETHER_WRAITH_2 = 35286, SPELL_SUMMON_NETHER_WRAITH_3 = 35287, SPELL_SUMMON_NETHER_WRAITH_4 = 35288, @@ -62,22 +62,22 @@ class boss_pathaleon_the_calculator : public CreatureScript : CreatureScript("boss_pathaleon_the_calculator") { } - + struct boss_pathaleon_the_calculatorAI : public ScriptedAI { boss_pathaleon_the_calculatorAI(Creature* pCreature) : ScriptedAI(pCreature), summons(me) { } - + uint32 Summon_Timer; SummonList summons; uint32 ManaTap_Timer; uint32 ArcaneTorrent_Timer; uint32 Domination_Timer; uint32 ArcaneExplosion_Timer; - + bool Enraged; - + uint32 Counter; void Reset() @@ -107,24 +107,24 @@ class boss_pathaleon_the_calculator : public CreatureScript { DoScriptText(SAY_DEATH, me); - summons.DespawnAll(); + summons.DespawnAll(); } - - void JustSummoned(Creature *summon) + + void JustSummoned(Creature *summon) { summons.Summon(summon); } - void SummonedCreatureDespawn(Creature *summon) + void SummonedCreatureDespawn(Creature *summon) { summons.Despawn(summon); } void UpdateAI(const uint32 diff) - { + { //Return since we have no target if (!UpdateVictim()) return; - + if (Summon_Timer <= diff) { for (uint8 i = 0; i < 3; ++i) @@ -136,7 +136,7 @@ class boss_pathaleon_the_calculator : public CreatureScript } DoScriptText(SAY_SUMMON, me); Summon_Timer = 30000 + rand()%15000; - } + } else Summon_Timer -= diff; @@ -144,18 +144,18 @@ class boss_pathaleon_the_calculator : public CreatureScript { DoCast(me->getVictim(), SPELL_MANA_TAP); ManaTap_Timer = 14000 + rand()%8000; - } + } else ManaTap_Timer -= diff; - + if (ArcaneTorrent_Timer <= diff) { DoCast(me->getVictim(), SPELL_ARCANE_TORRENT); ArcaneTorrent_Timer = 12000 + rand()%6000; } - else + else ArcaneTorrent_Timer -= diff; - + if (Domination_Timer <= diff) { if (Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM,1)) @@ -164,8 +164,8 @@ class boss_pathaleon_the_calculator : public CreatureScript DoCast(pTarget, SPELL_DOMINATION); } Domination_Timer = 25000 + rand()%5000; - } - else + } + else Domination_Timer -= diff; //Only casting if Heroic Mode is used @@ -176,10 +176,10 @@ class boss_pathaleon_the_calculator : public CreatureScript DoCast(me->getVictim(), H_SPELL_ARCANE_EXPLOSION); ArcaneExplosion_Timer = 10000 + rand()%4000; } - else - ArcaneExplosion_Timer -= diff; + else + ArcaneExplosion_Timer -= diff; } - + if (!Enraged && me->GetHealth()*100 / me->GetMaxHealth() < 21) { DoCast(me, SPELL_FRENZY); @@ -187,7 +187,7 @@ class boss_pathaleon_the_calculator : public CreatureScript Enraged = true; } - + DoMeleeAttackIfReady(); } }; @@ -206,7 +206,7 @@ class mob_nether_wraith : public CreatureScript : CreatureScript("mob_nether_wraith") { } - + struct mob_nether_wraithAI : public ScriptedAI { mob_nether_wraithAI(Creature* pCreature) : ScriptedAI(pCreature) {} @@ -238,8 +238,8 @@ class mob_nether_wraith : public CreatureScript else DoCast(me->getVictim(), SPELL_ARCANE_MISSILES); ArcaneMissiles_Timer = 5000 + rand()%5000; - } - else + } + else ArcaneMissiles_Timer -=diff; if (!Detonation) @@ -249,7 +249,7 @@ class mob_nether_wraith : public CreatureScript DoCast(me, SPELL_DETONATION); Detonation = true; } - else + else Detonation_Timer -= diff; } @@ -259,13 +259,13 @@ class mob_nether_wraith : public CreatureScript { me->setDeathState(JUST_DIED); me->RemoveCorpse(); - } - else + } + else Die_Timer -= diff; } DoMeleeAttackIfReady(); } - }; + }; CreatureAI* GetAI(Creature* pCreature) const { diff --git a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp index aa992098a67..3e2f9447fdb 100644 --- a/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp +++ b/src/server/scripts/Outland/TempestKeep/Mechanar/instance_mechanar.cpp @@ -35,18 +35,18 @@ class instance_mechanar : public InstanceMapScript : InstanceMapScript("instance_mechanar") { } - + struct instance_mechanar_InstanceMapScript : public InstanceScript { instance_mechanar_InstanceMapScript(Map* pMap) : InstanceScript(pMap) { Initialize(); }; - + uint32 m_auiEncounter[MAX_ENCOUNTER]; - + void Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); } - + bool IsEncounterInProgress() const { for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) @@ -55,7 +55,7 @@ class instance_mechanar : public InstanceMapScript return false; } - + uint32 GetData(uint32 type) { switch(type) @@ -83,7 +83,7 @@ class instance_mechanar : public InstanceMapScript { return new instance_mechanar_InstanceMapScript(pMap); } - + }; diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp index 2220526111c..cb63286167b 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/arcatraz.cpp @@ -80,7 +80,7 @@ class npc_millhouse_manastorm : public CreatureScript { pInstance = pCreature->GetInstanceScript(); } - + InstanceScript* pInstance; uint32 EventProgress_Timer; @@ -90,7 +90,7 @@ class npc_millhouse_manastorm : public CreatureScript uint32 Pyroblast_Timer; uint32 Fireball_Timer; - + void Reset() { EventProgress_Timer = 2000; @@ -106,11 +106,11 @@ class npc_millhouse_manastorm : public CreatureScript if (pInstance->GetData(TYPE_WARDEN_2) == DONE) Init = true; - if (pInstance->GetData(TYPE_HARBINGERSKYRISS) == DONE) - DoScriptText(SAY_COMPLETE, me); + if (pInstance->GetData(TYPE_HARBINGERSKYRISS) == DONE) + DoScriptText(SAY_COMPLETE, me); } } - + void AttackStart(Unit* pWho) { if (me->Attack(pWho, true)) @@ -137,7 +137,7 @@ class npc_millhouse_manastorm : public CreatureScript if (pInstance && pInstance->GetData(TYPE_HARBINGERSKYRISS) != DONE) ->FailQuest();*/ } - + void UpdateAI(const uint32 diff) { if (!Init) @@ -183,12 +183,12 @@ class npc_millhouse_manastorm : public CreatureScript } ++Phase; } - } - else + } + else EventProgress_Timer -= diff; } - if (!UpdateVictim()) + if (!UpdateVictim()) return; if (!LowHp && ((me->GetHealth()*100 / me->GetMaxHealth()) < 20)) { @@ -425,11 +425,11 @@ class npc_warden_mellichar : public CreatureScript case 2: switch (urand(0,1)) { - case 0: - me->SummonCreature(ENTRY_TRICKSTER,478.326,-148.505,42.56,3.19,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); + case 0: + me->SummonCreature(ENTRY_TRICKSTER,478.326,-148.505,42.56,3.19,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; case 1: - me->SummonCreature(ENTRY_PH_HUNTER,478.326,-148.505,42.56,3.19,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); + me->SummonCreature(ENTRY_PH_HUNTER,478.326,-148.505,42.56,3.19,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; } break; @@ -442,22 +442,22 @@ class npc_warden_mellichar : public CreatureScript case 5: switch (urand(0,1)) { - case 0: - me->SummonCreature(ENTRY_AKKIRIS,420.179,-174.396,42.58,0.02,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); + case 0: + me->SummonCreature(ENTRY_AKKIRIS,420.179,-174.396,42.58,0.02,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; - case 1: - me->SummonCreature(ENTRY_SULFURON,420.179,-174.396,42.58,0.02,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); + case 1: + me->SummonCreature(ENTRY_SULFURON,420.179,-174.396,42.58,0.02,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; } break; case 6: switch (urand(0,1)) { - case 0: - me->SummonCreature(ENTRY_TW_DRAK,471.795,-174.58,42.58,3.06,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); + case 0: + me->SummonCreature(ENTRY_TW_DRAK,471.795,-174.58,42.58,3.06,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; - case 1: - me->SummonCreature(ENTRY_BL_DRAK,471.795,-174.58,42.58,3.06,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); + case 1: + me->SummonCreature(ENTRY_BL_DRAK,471.795,-174.58,42.58,3.06,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000); break; } break; @@ -508,8 +508,8 @@ class npc_warden_mellichar : public CreatureScript break; } } - } - else + } + else EventProgress_Timer -= diff; } }; @@ -517,7 +517,7 @@ class npc_warden_mellichar : public CreatureScript CreatureAI* OnGetAI(Creature* creature) const { return new npc_warden_mellicharAI(creature); - } + } }; /*##### @@ -543,13 +543,13 @@ class mob_zerekethvoidzone : public CreatureScript me->SetUInt32Value(UNIT_NPC_FLAGS,0); me->setFaction(16); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - + DoCast(me, SPELL_VOID_ZONE_DAMAGE); } - + void EnterCombat(Unit* /*who*/) {} }; - + CreatureAI* OnGetAI(Creature* creature) const { return new mob_zerekethvoidzoneAI(creature); diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp index 076d1223f1a..87113dfe706 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/boss_harbinger_skyriss.cpp @@ -96,7 +96,7 @@ class boss_harbinger_skyriss : public CreatureScript IsImage66 = false; Intro_Phase = 1; - Intro_Timer = 5000; + Intro_Timer = 5000; MindRend_Timer = 3000; Fear_Timer = 15000; Domination_Timer = 30000; @@ -107,10 +107,10 @@ class boss_harbinger_skyriss : public CreatureScript { if (!Intro) return; - + ScriptedAI::MoveInLineOfSight(who); } - + void EnterCombat(Unit * /*who*/) {} void JustDied(Unit* /*Killer*/) @@ -189,7 +189,7 @@ class boss_harbinger_skyriss : public CreatureScript Intro = true; break; } - } + } else Intro_Timer -=diff; } @@ -271,7 +271,7 @@ class boss_harbinger_skyriss : public CreatureScript DoMeleeAttackIfReady(); } }; - + CreatureAI* GetAI(Creature* pCreature) const { return new boss_harbinger_skyrissAI (pCreature); @@ -295,7 +295,7 @@ class boss_harbinger_skyriss_illusion : public CreatureScript boss_harbinger_skyriss_illusionAI(Creature* pCreature) : ScriptedAI(pCreature) {} void Reset() { } - + void EnterCombat(Unit * /*who*/) { } }; diff --git a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp index 7a2d10db48d..006eb4625c2 100644 --- a/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp +++ b/src/server/scripts/Outland/TempestKeep/arcatraz/instance_arcatraz.cpp @@ -98,7 +98,7 @@ class instance_arcatraz : public InstanceMapScript return false; } - + void OnGameObjectCreate(GameObject* pGo, bool /*add*/) { @@ -155,7 +155,7 @@ class instance_arcatraz : public InstanceMapScript m_auiEncounter[8] = NOT_STARTED; } m_auiEncounter[3] = data; - break; + break; case TYPE_WARDEN_1: if (data == IN_PROGRESS) if (GameObject *pGo = instance->GetGameObject(Pod_AlphaGUID)) @@ -163,7 +163,7 @@ class instance_arcatraz : public InstanceMapScript m_auiEncounter[4] = data; break; case TYPE_WARDEN_2: - if (data == IN_PROGRESS) + if (data == IN_PROGRESS) { if (GameObject *pGo = instance->GetGameObject(Pod_BetaGUID)) pGo->UseDoorOrButton(); @@ -201,23 +201,23 @@ class instance_arcatraz : public InstanceMapScript pGo->UseDoorOrButton(); } break; - } + } } - + uint32 GetData(uint32 type) - { + { switch(type) { case TYPE_HARBINGERSKYRISS: return m_auiEncounter[3]; case TYPE_WARDEN_1: return m_auiEncounter[4]; - case TYPE_WARDEN_2: return m_auiEncounter[5]; + case TYPE_WARDEN_2: return m_auiEncounter[5]; case TYPE_WARDEN_3: return m_auiEncounter[6]; case TYPE_WARDEN_4: return m_auiEncounter[7]; case TYPE_WARDEN_5: return m_auiEncounter[8]; } return 0; } - + uint64 GetData64(uint32 data) { switch(data) diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp index 5be5e38e8a8..afeadadeb33 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_high_botanist_freywinn.cpp @@ -36,7 +36,7 @@ enum eSays }; enum eSpells -{ +{ SPELL_TRANQUILITY = 34550, SPELL_TREE_FORM = 34551, SPELL_SUMMON_FRAYER = 34557, @@ -134,8 +134,8 @@ class boss_high_botanist_freywinn : public CreatureScript MoveFree = false; TreeForm_Timer = 75000; - } - else + } + else TreeForm_Timer -= diff; if (!MoveFree) @@ -173,7 +173,7 @@ class boss_high_botanist_freywinn : public CreatureScript } MoveCheck_Timer = 500; } - else + else MoveCheck_Timer -= diff; return; @@ -187,8 +187,8 @@ class boss_high_botanist_freywinn : public CreatureScript { DoSummonSeedling(); SummonSeedling_Timer = 6000; - } - else + } + else SummonSeedling_Timer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp index 21239c265d9..3caf9c1bad0 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_laj.cpp @@ -26,7 +26,7 @@ EndScriptData */ #include "ScriptPCH.h" enum eSpells -{ +{ SPELL_ALLERGIC_REACTION = 34697, SPELL_TELEPORT_SELF = 34673, @@ -177,8 +177,8 @@ class boss_laj : public CreatureScript DoScriptText(EMOTE_SUMMON, me); DoSummons(); Summon_Timer = 2500; - } - else + } + else Summon_Timer -= diff; } @@ -186,8 +186,8 @@ class boss_laj : public CreatureScript { DoCast(me->getVictim(), SPELL_ALLERGIC_REACTION); Allergic_Timer = 25000+rand()%15000; - } - else + } + else Allergic_Timer -= diff; if (Teleport_Timer <= diff) @@ -195,16 +195,16 @@ class boss_laj : public CreatureScript DoCast(me, SPELL_TELEPORT_SELF); Teleport_Timer = 30000+rand()%10000; CanSummon = true; - } - else + } + else Teleport_Timer -= diff; if (Transform_Timer <= diff) { DoTransform(); Transform_Timer = 25000+rand()%15000; - } - else + } + else Transform_Timer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp index 378d07857ca..ee07fed2ffd 100644 --- a/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp +++ b/src/server/scripts/Outland/TempestKeep/botanica/boss_warp_splinter.cpp @@ -40,7 +40,7 @@ enum eSpells WAR_STOMP = 34716, SUMMON_TREANTS = 34727, // DBC: 34727, 34731, 34733, 34734, 34736, 34739, 34741 (with Ancestral Life spell 34742) // won't work (guardian summon) ARCANE_VOLLEY = 36705, - ARCANE_VOLLEY_H = 39133, + ARCANE_VOLLEY_H = 39133, SPELL_HEAL_FATHER = 6262, }; @@ -109,7 +109,7 @@ class mob_warp_splinter_treant : public CreatureScript } check_Timer = 1000; } - else + else check_Timer -= diff; return; } @@ -201,7 +201,7 @@ class boss_warp_splinter : public CreatureScript DoCast(me->getVictim(), WAR_STOMP); War_Stomp_Timer = 25000 + rand()%15000; } - else + else War_Stomp_Timer -= diff; //Check for Arcane Volley @@ -209,7 +209,7 @@ class boss_warp_splinter : public CreatureScript { DoCast(me->getVictim(), DUNGEON_MODE(ARCANE_VOLLEY,ARCANE_VOLLEY_H)); Arcane_Volley_Timer = 20000 + rand()%15000; - } + } else Arcane_Volley_Timer -= diff; @@ -218,8 +218,8 @@ class boss_warp_splinter : public CreatureScript { SummonTreants(); Summon_Treants_Timer = 45000; - } - else + } + else Summon_Treants_Timer -= diff; DoMeleeAttackIfReady(); diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 2bfb9863725..026dd45dd74 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -25,5 +25,5 @@ void AddSC_deathknight_spell_scripts() { - + } diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 15bdcebd33c..c475e1619a7 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -25,5 +25,5 @@ void AddSC_druid_spell_scripts() { - + } diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index 99eadf34371..1cca347003a 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -16,7 +16,7 @@ */ /* - * Scripts for spells with SPELLFAMILY_GENERIC which cannot be included in AI script file + * Scripts for spells with SPELLFAMILY_GENERIC which cannot be included in AI script file * of creature using it or can't be bound to any player class. * Ordered alphabetically using scriptname. * Scriptnames of files in this file should be prefixed with "spell_gen_" diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index b83a085f819..d379baa0dda 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -122,7 +122,7 @@ class spell_rog_preparation : public SpellHandlerScript for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();) { SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first); - + if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE) { if (spellInfo->SpellFamilyFlags[1] & SPELLFAMILYFLAG1_ROGUE_COLDB_SHADOWSTEP || // Cold Blood, Shadowstep diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 3fe0a93229e..2f3c9843460 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -25,5 +25,5 @@ void AddSC_shaman_spell_scripts() { - + } diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 0f7bb4fe15d..6053f0be138 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -25,5 +25,5 @@ void AddSC_warlock_spell_scripts() { - + } diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index 7b50e27a163..668b0087f9c 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -458,7 +458,7 @@ public: }; enum TheEmissary -{ +{ QUEST_THE_EMISSARY = 11626, NPC_LEVIROTH = 26452 }; diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 94de4b9e0b2..b4fe99c734f 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -2202,9 +2202,9 @@ public: } }; -/*###### -## npc_pet_trainer -######*/ +/*###### +## npc_pet_trainer +######*/ enum ePetTrainer { @@ -2373,174 +2373,174 @@ public: } }; -/*###### -## npc_tabard_vendor -######*/ - -enum -{ - QUEST_TRUE_MASTERS_OF_LIGHT = 9737, - QUEST_THE_UNWRITTEN_PROPHECY = 9762, - QUEST_INTO_THE_BREACH = 10259, - QUEST_BATTLE_OF_THE_CRIMSON_WATCH = 10781, - QUEST_SHARDS_OF_AHUNE = 11972, - - ACHIEVEMENT_EXPLORE_NORTHREND = 45, - ACHIEVEMENT_TWENTYFIVE_TABARDS = 1021, - ACHIEVEMENT_THE_LOREMASTER_A = 1681, - ACHIEVEMENT_THE_LOREMASTER_H = 1682, - - ITEM_TABARD_OF_THE_HAND = 24344, - ITEM_TABARD_OF_THE_BLOOD_KNIGHT = 25549, - ITEM_TABARD_OF_THE_PROTECTOR = 28788, - ITEM_OFFERING_OF_THE_SHATAR = 31408, - ITEM_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI = 31404, - ITEM_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI = 31405, - ITEM_TABARD_OF_THE_SUMMER_SKIES = 35279, - ITEM_TABARD_OF_THE_SUMMER_FLAMES = 35280, - ITEM_TABARD_OF_THE_ACHIEVER = 40643, - ITEM_LOREMASTERS_COLORS = 43300, - ITEM_TABARD_OF_THE_EXPLORER = 43348, - - SPELL_TABARD_OF_THE_BLOOD_KNIGHT = 54974, - SPELL_TABARD_OF_THE_HAND = 54976, - SPELL_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI = 54977, - SPELL_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI = 54982, - SPELL_TABARD_OF_THE_ACHIEVER = 55006, - SPELL_TABARD_OF_THE_PROTECTOR = 55008, - SPELL_LOREMASTERS_COLORS = 58194, - SPELL_TABARD_OF_THE_EXPLORER = 58224, - SPELL_TABARD_OF_SUMMER_SKIES = 62768, - SPELL_TABARD_OF_SUMMER_FLAMES = 62769 -}; - -#define GOSSIP_LOST_TABARD_OF_BLOOD_KNIGHT "I've lost my Tabard of Blood Knight." -#define GOSSIP_LOST_TABARD_OF_THE_HAND "I've lost my Tabard of the Hand." -#define GOSSIP_LOST_TABARD_OF_THE_PROTECTOR "I've lost my Tabard of the Protector." -#define GOSSIP_LOST_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI "I've lost my Green Trophy Tabard of the Illidari." -#define GOSSIP_LOST_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI "I've lost my Purple Trophy Tabard of the Illidari." -#define GOSSIP_LOST_TABARD_OF_SUMMER_SKIES "I've lost my Tabard of Summer Skies." -#define GOSSIP_LOST_TABARD_OF_SUMMER_FLAMES "I've lost my Tabard of Summer Flames." -#define GOSSIP_LOST_LOREMASTERS_COLORS "I've lost my Loremaster's Colors." -#define GOSSIP_LOST_TABARD_OF_THE_EXPLORER "I've lost my Tabard of the Explorer." -#define GOSSIP_LOST_TABARD_OF_THE_ACHIEVER "I've lost my Tabard of the Achiever." - +/*###### +## npc_tabard_vendor +######*/ + +enum +{ + QUEST_TRUE_MASTERS_OF_LIGHT = 9737, + QUEST_THE_UNWRITTEN_PROPHECY = 9762, + QUEST_INTO_THE_BREACH = 10259, + QUEST_BATTLE_OF_THE_CRIMSON_WATCH = 10781, + QUEST_SHARDS_OF_AHUNE = 11972, + + ACHIEVEMENT_EXPLORE_NORTHREND = 45, + ACHIEVEMENT_TWENTYFIVE_TABARDS = 1021, + ACHIEVEMENT_THE_LOREMASTER_A = 1681, + ACHIEVEMENT_THE_LOREMASTER_H = 1682, + + ITEM_TABARD_OF_THE_HAND = 24344, + ITEM_TABARD_OF_THE_BLOOD_KNIGHT = 25549, + ITEM_TABARD_OF_THE_PROTECTOR = 28788, + ITEM_OFFERING_OF_THE_SHATAR = 31408, + ITEM_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI = 31404, + ITEM_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI = 31405, + ITEM_TABARD_OF_THE_SUMMER_SKIES = 35279, + ITEM_TABARD_OF_THE_SUMMER_FLAMES = 35280, + ITEM_TABARD_OF_THE_ACHIEVER = 40643, + ITEM_LOREMASTERS_COLORS = 43300, + ITEM_TABARD_OF_THE_EXPLORER = 43348, + + SPELL_TABARD_OF_THE_BLOOD_KNIGHT = 54974, + SPELL_TABARD_OF_THE_HAND = 54976, + SPELL_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI = 54977, + SPELL_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI = 54982, + SPELL_TABARD_OF_THE_ACHIEVER = 55006, + SPELL_TABARD_OF_THE_PROTECTOR = 55008, + SPELL_LOREMASTERS_COLORS = 58194, + SPELL_TABARD_OF_THE_EXPLORER = 58224, + SPELL_TABARD_OF_SUMMER_SKIES = 62768, + SPELL_TABARD_OF_SUMMER_FLAMES = 62769 +}; + +#define GOSSIP_LOST_TABARD_OF_BLOOD_KNIGHT "I've lost my Tabard of Blood Knight." +#define GOSSIP_LOST_TABARD_OF_THE_HAND "I've lost my Tabard of the Hand." +#define GOSSIP_LOST_TABARD_OF_THE_PROTECTOR "I've lost my Tabard of the Protector." +#define GOSSIP_LOST_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI "I've lost my Green Trophy Tabard of the Illidari." +#define GOSSIP_LOST_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI "I've lost my Purple Trophy Tabard of the Illidari." +#define GOSSIP_LOST_TABARD_OF_SUMMER_SKIES "I've lost my Tabard of Summer Skies." +#define GOSSIP_LOST_TABARD_OF_SUMMER_FLAMES "I've lost my Tabard of Summer Flames." +#define GOSSIP_LOST_LOREMASTERS_COLORS "I've lost my Loremaster's Colors." +#define GOSSIP_LOST_TABARD_OF_THE_EXPLORER "I've lost my Tabard of the Explorer." +#define GOSSIP_LOST_TABARD_OF_THE_ACHIEVER "I've lost my Tabard of the Achiever." + class npc_tabard_vendor : public CreatureScript { public: npc_tabard_vendor() : CreatureScript("npc_tabard_vendor") { } - bool OnGossipHello(Player* pPlayer, Creature* pCreature) + bool OnGossipHello(Player* pPlayer, Creature* pCreature) + { + bool m_bLostBloodKnight = false; + bool m_bLostHand = false; + bool m_bLostProtector = false; + bool m_bLostIllidari = false; + bool m_bLostSummer = false; + + //Tabard of the Blood Knight + if (pPlayer->GetQuestRewardStatus(QUEST_TRUE_MASTERS_OF_LIGHT) && !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_BLOOD_KNIGHT, 1, true)) + m_bLostBloodKnight = true; + + //Tabard of the Hand + if (pPlayer->GetQuestRewardStatus(QUEST_THE_UNWRITTEN_PROPHECY) && !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_HAND, 1, true)) + m_bLostHand = true; + + //Tabard of the Protector + if (pPlayer->GetQuestRewardStatus(QUEST_INTO_THE_BREACH) && !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_PROTECTOR, 1, true)) + m_bLostProtector = true; + + //Green Trophy Tabard of the Illidari + //Purple Trophy Tabard of the Illidari + if (pPlayer->GetQuestRewardStatus(QUEST_BATTLE_OF_THE_CRIMSON_WATCH) && + (!pPlayer->HasItemCount(ITEM_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, 1, true) && + !pPlayer->HasItemCount(ITEM_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, 1, true) && + !pPlayer->HasItemCount(ITEM_OFFERING_OF_THE_SHATAR, 1, true))) + m_bLostIllidari = true; + + //Tabard of Summer Skies + //Tabard of Summer Flames + if (pPlayer->GetQuestRewardStatus(QUEST_SHARDS_OF_AHUNE) && + !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_SUMMER_SKIES, 1, true) && + !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_SUMMER_FLAMES, 1, true)) + m_bLostSummer = true; + + if (m_bLostBloodKnight || m_bLostHand || m_bLostProtector || m_bLostIllidari || m_bLostSummer) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + + if (m_bLostBloodKnight) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_BLOOD_KNIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +1); + + if (m_bLostHand) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_THE_HAND, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +2); + + if (m_bLostProtector) + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_THE_PROTECTOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + + if (m_bLostIllidari) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); + } + + if (m_bLostSummer) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_SKIES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_FLAMES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); + } + + pPlayer->SEND_GOSSIP_MENU(13583, pCreature->GetGUID()); + } + else + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + + return true; + } + + bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) { - bool m_bLostBloodKnight = false; - bool m_bLostHand = false; - bool m_bLostProtector = false; - bool m_bLostIllidari = false; - bool m_bLostSummer = false; - - //Tabard of the Blood Knight - if (pPlayer->GetQuestRewardStatus(QUEST_TRUE_MASTERS_OF_LIGHT) && !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_BLOOD_KNIGHT, 1, true)) - m_bLostBloodKnight = true; - - //Tabard of the Hand - if (pPlayer->GetQuestRewardStatus(QUEST_THE_UNWRITTEN_PROPHECY) && !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_HAND, 1, true)) - m_bLostHand = true; - - //Tabard of the Protector - if (pPlayer->GetQuestRewardStatus(QUEST_INTO_THE_BREACH) && !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_PROTECTOR, 1, true)) - m_bLostProtector = true; - - //Green Trophy Tabard of the Illidari - //Purple Trophy Tabard of the Illidari - if (pPlayer->GetQuestRewardStatus(QUEST_BATTLE_OF_THE_CRIMSON_WATCH) && - (!pPlayer->HasItemCount(ITEM_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, 1, true) && - !pPlayer->HasItemCount(ITEM_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, 1, true) && - !pPlayer->HasItemCount(ITEM_OFFERING_OF_THE_SHATAR, 1, true))) - m_bLostIllidari = true; - - //Tabard of Summer Skies - //Tabard of Summer Flames - if (pPlayer->GetQuestRewardStatus(QUEST_SHARDS_OF_AHUNE) && - !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_SUMMER_SKIES, 1, true) && - !pPlayer->HasItemCount(ITEM_TABARD_OF_THE_SUMMER_FLAMES, 1, true)) - m_bLostSummer = true; - - if (m_bLostBloodKnight || m_bLostHand || m_bLostProtector || m_bLostIllidari || m_bLostSummer) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); - - if (m_bLostBloodKnight) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_BLOOD_KNIGHT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +1); - - if (m_bLostHand) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_THE_HAND, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF +2); - - if (m_bLostProtector) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_THE_PROTECTOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - - if (m_bLostIllidari) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5); - } - - if (m_bLostSummer) - { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_SKIES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6); - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_LOST_TABARD_OF_SUMMER_FLAMES, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7); - } - - pPlayer->SEND_GOSSIP_MENU(13583, pCreature->GetGUID()); - } - else - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); - - return true; - } - - bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction) - { - switch(uiAction) - { - case GOSSIP_ACTION_TRADE: - pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); - break; - case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_THE_BLOOD_KNIGHT, false); - break; - case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_THE_HAND, false); - break; - case GOSSIP_ACTION_INFO_DEF+3: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_THE_PROTECTOR, false); - break; - case GOSSIP_ACTION_INFO_DEF+4: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, false); - break; - case GOSSIP_ACTION_INFO_DEF+5: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, false); - break; - case GOSSIP_ACTION_INFO_DEF+6: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_SUMMER_SKIES, false); - break; - case GOSSIP_ACTION_INFO_DEF+7: - pPlayer->CLOSE_GOSSIP_MENU(); - pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_SUMMER_FLAMES, false); - break; - } - return true; + switch(uiAction) + { + case GOSSIP_ACTION_TRADE: + pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_THE_BLOOD_KNIGHT, false); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_THE_HAND, false); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_THE_PROTECTOR, false); + break; + case GOSSIP_ACTION_INFO_DEF+4: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_GREEN_TROPHY_TABARD_OF_THE_ILLIDARI, false); + break; + case GOSSIP_ACTION_INFO_DEF+5: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_PURPLE_TROPHY_TABARD_OF_THE_ILLIDARI, false); + break; + case GOSSIP_ACTION_INFO_DEF+6: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_SUMMER_SKIES, false); + break; + case GOSSIP_ACTION_INFO_DEF+7: + pPlayer->CLOSE_GOSSIP_MENU(); + pPlayer->CastSpell(pPlayer, SPELL_TABARD_OF_SUMMER_FLAMES, false); + break; + } + return true; } }; -/*###### -## npc_experience -######*/ +/*###### +## npc_experience +######*/ #define EXP_COST 100000//10 00 00 copper (10golds) #define GOSSIP_TEXT_EXP 14736 @@ -2628,7 +2628,7 @@ void AddSC_npcs_special() new npc_wormhole; new npc_pet_trainer; new npc_locksmith; - new npc_tabard_vendor; + new npc_tabard_vendor; new npc_experience; } diff --git a/src/server/shared/DataStores/DBCStore.h b/src/server/shared/DataStores/DBCStore.h index 22c77fadb27..3e448acd13b 100644 --- a/src/server/shared/DataStores/DBCStore.h +++ b/src/server/shared/DataStores/DBCStore.h @@ -92,7 +92,7 @@ class DBCStorage query +=" ORDER BY " + *sql->indexName + " DESC"; query += ";"; - + result = WorldDatabase.Query(query.c_str()); if (result) { diff --git a/src/server/shared/Database/Database.cpp b/src/server/shared/Database/Database.cpp index e2bfc58d96d..83a9849a075 100644 --- a/src/server/shared/Database/Database.cpp +++ b/src/server/shared/Database/Database.cpp @@ -38,7 +38,7 @@ size_t Database::db_count = 0; -Database::Database() : mMysql(NULL) +Database::Database() : mMysql(NULL) { // before first connection if (db_count++ == 0) diff --git a/src/server/shared/Database/PreparedStatements.cpp b/src/server/shared/Database/PreparedStatements.cpp index 40a910acf9e..ec57a0f90e8 100644 --- a/src/server/shared/Database/PreparedStatements.cpp +++ b/src/server/shared/Database/PreparedStatements.cpp @@ -11,12 +11,12 @@ void PreparedStatementHolder::_prepareStatement(const char* name, const char* sq strcat(query, "'"); strcat(query, sql); strcat(query, "'"); - + DEBUG_LOG("Preparing statement: %s", query); db->Execute(query); - + delete[] query; - ++count; + ++count; } void PreparedStatementHolder::LoadAuthserver(Database *db, uint32 &count) @@ -41,7 +41,7 @@ void PreparedStatementHolder::PExecute(Database *db, const char *name, const cha { // NOTE: if args == NULL, we're crashing here. No need to waste performance on checking; // devs must make sure they use PExecute for args and Execute for no args. - + const char prefix[] = "EXECUTE "; size_t querySize = 8 + strlen(name) + 7 + strlen(args) + 1; char* query = new char[querySize]; @@ -49,7 +49,7 @@ void PreparedStatementHolder::PExecute(Database *db, const char *name, const cha strcat(query, name); strcat(query, " USING "); strcat(query, args); - + DEBUG_LOG("Prepared statement (parsed args): %s", query); db->Execute(query); delete[] query; diff --git a/src/server/shared/Database/PreparedStatements.h b/src/server/shared/Database/PreparedStatements.h index c19119dcb3d..277d2b833ec 100644 --- a/src/server/shared/Database/PreparedStatements.h +++ b/src/server/shared/Database/PreparedStatements.h @@ -10,18 +10,18 @@ class PreparedStatementHolder void LoadCharacters(Database *db, uint32 &count); void LoadAuthserver(Database *db, uint32 &count); void LoadWorldserver(Database *db, uint32 &count); - + ///- Executes prepared statement that doesn't require feedback with name $name on database $db void Execute(Database *db, const char* name); - ///- Executes prepared statement that doesn't require feedback with name $name and args $args + ///- Executes prepared statement that doesn't require feedback with name $name and args $args ///- on database $db void PExecute(Database *db, const char* name, const char* args); - + ///- Executes a prepared statement without args on db $db with name $name and puts the result set in a pointer. QueryResult_AutoPtr Query(Database* db, const char* name); ///- Executes a prepared statement with args $args on db $db with name $name and put the result set in a pointer. QueryResult_AutoPtr PQuery(Database* db, const char* name, const char* args); - + private: void _prepareStatement(const char* name, const char* sql, Database *db, uint32 &count); diff --git a/src/server/shared/Database/SqlOperations.cpp b/src/server/shared/Database/SqlOperations.cpp index 785c5cb84e7..33b96a30533 100644 --- a/src/server/shared/Database/SqlOperations.cpp +++ b/src/server/shared/Database/SqlOperations.cpp @@ -41,12 +41,12 @@ void SqlTransaction::Execute(Database *db) m_Mutex.release(); return; } - + db->DirectExecute("START TRANSACTION"); while (!m_queue.empty()) { sql = m_queue.front(); - + if (!db->DirectExecute(sql)) { free((void*)const_cast<char*>(sql)); diff --git a/src/server/shared/Database/SqlOperations.h b/src/server/shared/Database/SqlOperations.h index eb28a2c0790..337790e4c72 100644 --- a/src/server/shared/Database/SqlOperations.h +++ b/src/server/shared/Database/SqlOperations.h @@ -135,10 +135,10 @@ class SqlAsyncTask : public ACE_Method_Request public: SqlAsyncTask(Database * db, SqlOperation * op) : m_db(db), m_op(op){} ~SqlAsyncTask() - { + { if (!m_op) - return; - + return; + delete m_op; m_op = NULL; } diff --git a/src/server/shared/Dynamic/ObjectRegistry.h b/src/server/shared/Dynamic/ObjectRegistry.h index 11052a9f0a7..0d24cc1982e 100644 --- a/src/server/shared/Dynamic/ObjectRegistry.h +++ b/src/server/shared/Dynamic/ObjectRegistry.h @@ -103,7 +103,7 @@ class ObjectRegistry } private: RegistryMapType i_registeredObjects; - + }; #endif diff --git a/src/server/shared/Logging/Log.cpp b/src/server/shared/Logging/Log.cpp index 563c9593e65..70256375679 100644 --- a/src/server/shared/Logging/Log.cpp +++ b/src/server/shared/Logging/Log.cpp @@ -28,7 +28,7 @@ Log::Log() : raLogfile(NULL), logfile(NULL), gmLogfile(NULL), charLogfile(NULL), - dberLogfile(NULL), chatLogfile(NULL), m_gmlog_per_account(false), + dberLogfile(NULL), chatLogfile(NULL), m_gmlog_per_account(false), m_enableLogDBLater(false), m_enableLogDB(false), m_colored(false), arenaLogFile(NULL) { diff --git a/src/server/shared/Threading/LockedQueue.h b/src/server/shared/Threading/LockedQueue.h index ff6056350f3..16889d792be 100644 --- a/src/server/shared/Threading/LockedQueue.h +++ b/src/server/shared/Threading/LockedQueue.h @@ -120,14 +120,14 @@ namespace ACE_Based { this->_lock.release(); } - + ///! Calls pop_front of the queue void pop_front() { ACE_GUARD (LockType, g, this->_lock); _queue.pop_front(); } - + ///! Checks if we're empty or not with locks held bool empty() { diff --git a/src/server/shared/Utilities/Util.h b/src/server/shared/Utilities/Util.h index 3edf0c50c61..335982a7c89 100644 --- a/src/server/shared/Utilities/Util.h +++ b/src/server/shared/Utilities/Util.h @@ -320,7 +320,7 @@ class HookList private: typename std::list<T> m_list; public: - HookList<T> & operator+=(T t) + HookList<T> & operator+=(T t) { m_list.push_back(t); return *this; diff --git a/src/server/worldserver/CMakeLists.txt b/src/server/worldserver/CMakeLists.txt index 66af4823ef9..0da16a224b7 100644 --- a/src/server/worldserver/CMakeLists.txt +++ b/src/server/worldserver/CMakeLists.txt @@ -186,7 +186,7 @@ else() ${ACE_LIBRARY} ${MYSQL_LIBRARY} ${OPENSSL_LIBRARIES} - ${ZLIB_LIBRARIES} + ${ZLIB_LIBRARIES} ${OSX_LIBS} ) endif() diff --git a/src/server/worldserver/RemoteAccess/RASocket.cpp b/src/server/worldserver/RemoteAccess/RASocket.cpp index 69601155b37..8fdc7ccd948 100644 --- a/src/server/worldserver/RemoteAccess/RASocket.cpp +++ b/src/server/worldserver/RemoteAccess/RASocket.cpp @@ -205,7 +205,7 @@ void RASocket::OnRead() SetDeleteByHandler(false); CliCommandHolder* cmd = new CliCommandHolder(this, buff, &RASocket::zprint, &RASocket::commandFinished); sWorld.QueueCliCommand(cmd); - ++pendingCommands; + ++pendingCommands; } else Sendf("TC>"); @@ -231,7 +231,7 @@ void RASocket::commandFinished(void* callbackArg, bool success) RASocket* raSocket = (RASocket*)callbackArg; raSocket->Sendf("TC>"); uint64 remainingCommands = --raSocket->pendingCommands; - + if(remainingCommands == 0) raSocket->SetDeleteByHandler(true); } diff --git a/src/server/worldserver/RemoteAccess/RASocket.h b/src/server/worldserver/RemoteAccess/RASocket.h index 4d491e5a436..2c7e57196c7 100644 --- a/src/server/worldserver/RemoteAccess/RASocket.h +++ b/src/server/worldserver/RemoteAccess/RASocket.h @@ -52,7 +52,7 @@ class RASocket: public TcpSocket private: char buff[RA_BUFF_SIZE]; std::string szLogin; - + unsigned int iInputLength; bool bSecure; //will protect from DOS, bruteforce attacks diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index fdb776b4c75..60a3fcfeadf 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -146,11 +146,11 @@ EAIErrorLevel = 2 # Default: 900000 (15 min) # # PlayerSave.Stats.MinLevel -# Minimum level for saving character stats for external usage in database -# Default: 0 (do not save character stats) -# 1+ (save stats for characters with level 1+) +# Minimum level for saving character stats for external usage in database +# Default: 0 (do not save character stats) +# 1+ (save stats for characters with level 1+) # -# PlayerSave.Stats.SaveOnlyOnLogout +# PlayerSave.Stats.SaveOnlyOnLogout # Enable/Disable saving of character stats only on logout # Default: 1 (only save on logout) # 0 (save on every player save) @@ -171,12 +171,12 @@ EAIErrorLevel = 2 # vmap.ignoreSpellIds # These spells are ignored for LoS calculation # List of ids with delimiter ',' -# +# # vmap.petLOS # Check LOS for pets, to avoid them going through walls etc. # 0 (disable, somewhat less CPU usage) # Default: 1 (enable, each pet attack command will check for LOS) -# +# # vmap.enableIndoorCheck # Enable/Disable VMap based indoor check to remove outdoor-only auras (mounts etc.) # 0 (disabled, somewhat less CPU usage) @@ -224,8 +224,8 @@ EAIErrorLevel = 2 # 0 (do not permit addon channel) # # MapUpdate.Threads -# Number of threads to update maps. -# Default: 1 +# Number of threads to update maps. +# Default: 1 # # CleanCharacterDB # Perform character db clean ups on start up @@ -1745,12 +1745,12 @@ Battleground.Random.ResetHour = 6 # 0 (finished) # # Arena.ArenaStartRating -# Start arena team command rating -# Default: 1500 +# Start arena team command rating +# Default: 1500 # # Arena.StartPersonalRating -# Start personal rating on entry in team -# Default: 1500 +# Start personal rating on entry in team +# Default: 1500 # ############################################################################### diff --git a/src/server/worldserver/worldserver.ico b/src/server/worldserver/worldserver.ico Binary files differindex 6f0a5721957..05dbf55ce35 100644 --- a/src/server/worldserver/worldserver.ico +++ b/src/server/worldserver/worldserver.ico diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp index 2640b65d8b1..700abd2fe76 100644 --- a/src/tools/map_extractor/System.cpp +++ b/src/tools/map_extractor/System.cpp @@ -655,7 +655,7 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x, uint32 // Dark water detect if (type == LIQUID_TYPE_OCEAN) { - uint8 *lm = h2o->getLiquidLightMap(h); + uint8 *lm = h2o->getLiquidLightMap(h); if (!lm) liquid_type[i][j]|=MAP_LIQUID_TYPE_DARK_WATER; } @@ -813,7 +813,7 @@ bool ConvertADT(char *filename, char *filename2, int cell_y, int cell_x, uint32 liquidHeader.liquidType = type; else map.liquidMapSize+=sizeof(liquid_type); - + if (!(liquidHeader.flags & MAP_LIQUID_NO_HEIGHT)) map.liquidMapSize += sizeof(float)*liquidHeader.width*liquidHeader.height; } @@ -917,7 +917,7 @@ void ExtractMapsFromMpq(uint32 build) delete [] map_ids; } -bool ExtractFile( char const* mpq_name, std::string const& filename ) +bool ExtractFile( char const* mpq_name, std::string const& filename ) { FILE *output = fopen(filename.c_str(), "wb"); if(!output) diff --git a/src/tools/map_extractor/adt.h b/src/tools/map_extractor/adt.h index 725c5b994ee..51d3ccb8698 100644 --- a/src/tools/map_extractor/adt.h +++ b/src/tools/map_extractor/adt.h @@ -55,7 +55,7 @@ public: uint32 light; float height; } liquid[ADT_CELL_SIZE+1][ADT_CELL_SIZE+1]; - + // 1<<0 - ochen // 1<<1 - lava/slime // 1<<2 - water @@ -197,7 +197,7 @@ public: return 0; } - float *getLiquidHeightMap(adt_liquid_header *h) + float *getLiquidHeightMap(adt_liquid_header *h) { if (h->formatFlags & ADT_LIQUID_HEADER_NO_HIGHT) return 0; @@ -206,7 +206,7 @@ public: return 0; } - uint8 *getLiquidLightMap(adt_liquid_header *h) + uint8 *getLiquidLightMap(adt_liquid_header *h) { if (h->formatFlags&ADT_LIQUID_HEADER_FULL_LIGHT) return 0; @@ -219,7 +219,7 @@ public: return 0; } - uint32 *getLiquidFullLightMap(adt_liquid_header *h) + uint32 *getLiquidFullLightMap(adt_liquid_header *h) { if (!(h->formatFlags&ADT_LIQUID_HEADER_FULL_LIGHT)) return 0; @@ -232,7 +232,7 @@ public: return 0; } - uint64 getLiquidShowMap(adt_liquid_header *h) + uint64 getLiquidShowMap(adt_liquid_header *h) { if (h->offsData2a) return *((uint64 *)((uint8*)this + 8 + h->offsData2a)); @@ -255,12 +255,12 @@ class adt_MHDR uint32 pad; uint32 offsMCIN; // MCIN - uint32 offsTex; // MTEX - uint32 offsModels; // MMDX - uint32 offsModelsIds; // MMID - uint32 offsMapObejcts; // MWMO - uint32 offsMapObejctsIds; // MWID - uint32 offsDoodsDef; // MDDF + uint32 offsTex; // MTEX + uint32 offsModels; // MMDX + uint32 offsModelsIds; // MMID + uint32 offsMapObejcts; // MWMO + uint32 offsMapObejctsIds; // MWID + uint32 offsDoodsDef; // MDDF uint32 offsObjectsDef; // MODF uint32 offsMFBO; // MFBO uint32 offsMH2O; // MH2O diff --git a/src/tools/map_extractor/loadlib/loadlib.h b/src/tools/map_extractor/loadlib/loadlib.h index 49d5f590744..bf6c0706d46 100644 --- a/src/tools/map_extractor/loadlib/loadlib.h +++ b/src/tools/map_extractor/loadlib/loadlib.h @@ -12,9 +12,9 @@ typedef unsigned __int16 uint16; typedef unsigned __int8 uint8; #else #include <stdint.h> -#ifndef uint64_t +#ifndef uint64_t #ifdef __linux__ -#include <linux/types.h> +#include <linux/types.h> #endif #endif typedef int64_t int64; diff --git a/src/tools/map_extractor/mpq_libmpq04.h b/src/tools/map_extractor/mpq_libmpq04.h index 26008f5fba1..22d586a4a3f 100644 --- a/src/tools/map_extractor/mpq_libmpq04.h +++ b/src/tools/map_extractor/mpq_libmpq04.h @@ -24,14 +24,14 @@ public: void close(); void GetFileListTo(vector<string>& filelist) { - uint32_t filenum; - if(libmpq__file_number(mpq_a, "(listfile)", &filenum)) return; - libmpq__off_t size, transferred; - libmpq__file_unpacked_size(mpq_a, filenum, &size); + uint32_t filenum; + if(libmpq__file_number(mpq_a, "(listfile)", &filenum)) return; + libmpq__off_t size, transferred; + libmpq__file_unpacked_size(mpq_a, filenum, &size); char *buffer = new char[size]; - - libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred); + + libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred); char seps[] = "\n"; char *token; diff --git a/src/tools/vmap3_extractor/loadlib/loadlib.h b/src/tools/vmap3_extractor/loadlib/loadlib.h index 49d5f590744..bf6c0706d46 100644 --- a/src/tools/vmap3_extractor/loadlib/loadlib.h +++ b/src/tools/vmap3_extractor/loadlib/loadlib.h @@ -12,9 +12,9 @@ typedef unsigned __int16 uint16; typedef unsigned __int8 uint8; #else #include <stdint.h> -#ifndef uint64_t +#ifndef uint64_t #ifdef __linux__ -#include <linux/types.h> +#include <linux/types.h> #endif #endif typedef int64_t int64; diff --git a/src/tools/vmap3_extractor/model.cpp b/src/tools/vmap3_extractor/model.cpp index a2493f7e571..81e27621956 100644 --- a/src/tools/vmap3_extractor/model.cpp +++ b/src/tools/vmap3_extractor/model.cpp @@ -154,7 +154,7 @@ ModelInstance::ModelInstance(MPQFile &f,const char* ModelInstName, uint32 mapID, uint16 adtId = 0;// not used for models uint32 flags = MOD_M2; - if(tileX == 65 && tileY == 65) flags |= MOD_WORLDSPAWN; + if(tileX == 65 && tileY == 65) flags |= MOD_WORLDSPAWN; //write mapID, tileX, tileY, Flags, ID, Pos, Rot, Scale, name fwrite(&mapID, sizeof(uint32), 1, pDirfile); fwrite(&tileX, sizeof(uint32), 1, pDirfile); diff --git a/src/tools/vmap3_extractor/model.h b/src/tools/vmap3_extractor/model.h index d1be46f3c13..c131645bd73 100644 --- a/src/tools/vmap3_extractor/model.h +++ b/src/tools/vmap3_extractor/model.h @@ -35,7 +35,7 @@ private: char outfilename; }; -class ModelInstance +class ModelInstance { public: Model *model; diff --git a/src/tools/vmap3_extractor/mpq_libmpq04.h b/src/tools/vmap3_extractor/mpq_libmpq04.h index 4fe80f2759c..b8ca49c2fc8 100644 --- a/src/tools/vmap3_extractor/mpq_libmpq04.h +++ b/src/tools/vmap3_extractor/mpq_libmpq04.h @@ -21,14 +21,14 @@ public: void close(); void GetFileListTo(vector<string>& filelist) { - uint32 filenum; - if(libmpq__file_number(mpq_a, "(listfile)", &filenum)) return; - libmpq__off_t size, transferred; - libmpq__file_unpacked_size(mpq_a, filenum, &size); + uint32 filenum; + if(libmpq__file_number(mpq_a, "(listfile)", &filenum)) return; + libmpq__off_t size, transferred; + libmpq__file_unpacked_size(mpq_a, filenum, &size); char *buffer = new char[size]; - - libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred); + + libmpq__file_read(mpq_a, filenum, (unsigned char*)buffer, size, &transferred); char seps[] = "\n"; char *token; diff --git a/src/tools/vmap3_extractor/vec3d.h b/src/tools/vmap3_extractor/vec3d.h index d2569bc133b..16f815c423d 100644 --- a/src/tools/vmap3_extractor/vec3d.h +++ b/src/tools/vmap3_extractor/vec3d.h @@ -106,7 +106,7 @@ public: in >> v.x >> v.y >> v.z; return in; } - + friend std::ostream& operator<<(std::ostream& out, const Vec3D& v) { out << v.x << " " << v.y << " " << v.z; diff --git a/src/tools/vmap3_extractor/vmapexport.h b/src/tools/vmap3_extractor/vmapexport.h index fa9a609abf5..e8a55fb898e 100644 --- a/src/tools/vmap3_extractor/vmapexport.h +++ b/src/tools/vmap3_extractor/vmapexport.h @@ -3,8 +3,8 @@ enum ModelFlags { - MOD_M2 = 1, - MOD_WORLDSPAWN = 1<<1, + MOD_M2 = 1, + MOD_WORLDSPAWN = 1<<1, MOD_HAS_BOUND = 1<<2 }; |