diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/Debugging/Errors.cpp | 2 | ||||
-rw-r--r-- | src/common/Logging/AppenderFile.cpp | 3 | ||||
-rw-r--r-- | src/common/Threading/ProcessPriority.h | 30 | ||||
-rw-r--r-- | src/common/Threading/ProducerConsumerQueue.h | 30 | ||||
-rw-r--r-- | src/common/Utilities/MessageBuffer.h | 30 | ||||
-rw-r--r-- | src/common/Utilities/Random.cpp | 2 | ||||
-rw-r--r-- | src/common/Utilities/Random.h | 2 | ||||
-rw-r--r-- | src/server/game/AI/ScriptedAI/ScriptedCreature.h | 2 | ||||
-rw-r--r-- | src/server/game/Accounts/RBAC.h | 56 | ||||
-rw-r--r-- | src/server/game/Entities/Unit/StatSystem.cpp | 5 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_server.cpp | 15 | ||||
-rw-r--r-- | src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp | 4 | ||||
-rw-r--r-- | src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp | 53 |
13 files changed, 145 insertions, 89 deletions
diff --git a/src/common/Debugging/Errors.cpp b/src/common/Debugging/Errors.cpp index 2ce00229e53..6157cd786cd 100644 --- a/src/common/Debugging/Errors.cpp +++ b/src/common/Debugging/Errors.cpp @@ -90,7 +90,7 @@ void Warning(char const* file, int line, char const* function, char const* messa void Abort(char const* file, int line, char const* function) { - fprintf(stderr, "\n%s:%i in %s ABORTED\n", + fprintf(stderr, "\n%s:%i in %s ABORTED.\n", file, line, function); *((volatile int*)NULL) = 0; exit(1); diff --git a/src/common/Logging/AppenderFile.cpp b/src/common/Logging/AppenderFile.cpp index 20fa3dc720b..ecb65ae7d16 100644 --- a/src/common/Logging/AppenderFile.cpp +++ b/src/common/Logging/AppenderFile.cpp @@ -28,6 +28,7 @@ AppenderFile::AppenderFile(uint8 id, std::string const& name, LogLevel level, Ap Appender(id, name, level, flags), logfile(NULL), _logDir(sLog->GetLogsDir()), + _maxFileSize(0), _fileSize(0) { if (extraArgs.empty()) @@ -50,8 +51,6 @@ AppenderFile::AppenderFile(uint8 id, std::string const& name, LogLevel level, Ap if (extraArgs.size() > 2) _maxFileSize = atoi(extraArgs[2]); - else - _maxFileSize = 0; _dynamicName = std::string::npos != _fileName.find("%s"); _backup = (flags & APPENDER_FLAGS_MAKE_FILE_BACKUP) != 0; diff --git a/src/common/Threading/ProcessPriority.h b/src/common/Threading/ProcessPriority.h index 7119daa5030..2d7e9cca2f1 100644 --- a/src/common/Threading/ProcessPriority.h +++ b/src/common/Threading/ProcessPriority.h @@ -1,19 +1,19 @@ /* -* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at your -* option) any later version. -* -* This program is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with this program. If not, see <http://www.gnu.org/licenses/>. -*/ + * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ #ifndef _PROCESSPRIO_H #define _PROCESSPRIO_H diff --git a/src/common/Threading/ProducerConsumerQueue.h b/src/common/Threading/ProducerConsumerQueue.h index bd4c8efd32c..e8e71ac35c7 100644 --- a/src/common/Threading/ProducerConsumerQueue.h +++ b/src/common/Threading/ProducerConsumerQueue.h @@ -1,19 +1,19 @@ /* -* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at your -* option) any later version. -* -* This program is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with this program. If not, see <http://www.gnu.org/licenses/>. -*/ + * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ #ifndef _PCQ_H #define _PCQ_H diff --git a/src/common/Utilities/MessageBuffer.h b/src/common/Utilities/MessageBuffer.h index d08c4b25bab..c3faf234f1d 100644 --- a/src/common/Utilities/MessageBuffer.h +++ b/src/common/Utilities/MessageBuffer.h @@ -1,19 +1,19 @@ /* -* Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> -* -* This program is free software; you can redistribute it and/or modify it -* under the terms of the GNU General Public License as published by the -* Free Software Foundation; either version 2 of the License, or (at your -* option) any later version. -* -* This program is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* You should have received a copy of the GNU General Public License along -* with this program. If not, see <http://www.gnu.org/licenses/>. -*/ + * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ #ifndef __MESSAGEBUFFER_H_ #define __MESSAGEBUFFER_H_ diff --git a/src/common/Utilities/Random.cpp b/src/common/Utilities/Random.cpp index 31318e8f52d..1c325c38308 100644 --- a/src/common/Utilities/Random.cpp +++ b/src/common/Utilities/Random.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/common/Utilities/Random.h b/src/common/Utilities/Random.h index b3ca00219ef..d7269928dfe 100644 --- a/src/common/Utilities/Random.h +++ b/src/common/Utilities/Random.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2015 TrinityCore <http://www.trinitycore.org/> + * Copyright (C) 2008-2016 TrinityCore <http://www.trinitycore.org/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h index bbc7e8beadb..6a130d8f20f 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h @@ -369,7 +369,7 @@ class TC_GAME_API BossAI : public ScriptedAI void _JustDied(); void _JustReachedHome() { me->setActive(false); } void _DespawnAtEvade(uint32 delayToRespawn = 30, Creature* who = nullptr); - void _DespawnAtEvade(Milliseconds const& time, Creature* who = nullptr) { _DespawnAtEvade(uint32(time.count()), who); } + void _DespawnAtEvade(Seconds const& time, Creature* who = nullptr) { _DespawnAtEvade(uint32(time.count()), who); } void TeleportCheaters(); diff --git a/src/server/game/Accounts/RBAC.h b/src/server/game/Accounts/RBAC.h index 741983431dd..70b60d11a65 100644 --- a/src/server/game/Accounts/RBAC.h +++ b/src/server/game/Accounts/RBAC.h @@ -59,9 +59,9 @@ enum RBACPermissions // 7 - reuse // 8 - reuse // 9 - reuse - // 10 - 7.x only + RBAC_PERM_USE_CHARACTER_TEMPLATES = 10, // not on 3.3.5a RBAC_PERM_LOG_GM_TRADE = 11, - // 12 - 7.x only + RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_DEMON_HUNTER = 12, // not on 3.3.5a RBAC_PERM_SKIP_CHECK_INSTANCE_REQUIRED_BOSSES = 13, RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_TEAMMASK = 14, RBAC_PERM_SKIP_CHECK_CHARACTER_CREATION_CLASSMASK = 15, @@ -111,7 +111,16 @@ enum RBACPermissions RBAC_PERM_COMMAND_RBAC_ACC_PERM_DENY = 204, RBAC_PERM_COMMAND_RBAC_ACC_PERM_REVOKE = 205, RBAC_PERM_COMMAND_RBAC_LIST = 206, - // 207 - 216 do NOT use + RBAC_PERM_COMMAND_BNET_ACCOUNT = 207, // not on 3.3.5a + RBAC_PERM_COMMAND_BNET_ACCOUNT_CREATE = 208, // not on 3.3.5a + RBAC_PERM_COMMAND_BNET_ACCOUNT_LOCK_COUNTRY = 209, // not on 3.3.5a + RBAC_PERM_COMMAND_BNET_ACCOUNT_LOCK_IP = 210, // not on 3.3.5a + RBAC_PERM_COMMAND_BNET_ACCOUNT_PASSWORD = 211, // not on 3.3.5a + RBAC_PERM_COMMAND_BNET_ACCOUNT_SET = 212, // not on 3.3.5a + RBAC_PERM_COMMAND_BNET_ACCOUNT_SET_PASSWORD = 213, // not on 3.3.5a + RBAC_PERM_COMMAND_BNET_ACCOUNT_LINK = 214, // not on 3.3.5a + RBAC_PERM_COMMAND_BNET_ACCOUNT_UNLINK = 215, // not on 3.3.5a + RBAC_PERM_COMMAND_BNET_ACCOUNT_CREATE_GAME = 216, // not on 3.3.5a RBAC_PERM_COMMAND_ACCOUNT = 217, RBAC_PERM_COMMAND_ACCOUNT_ADDON = 218, RBAC_PERM_COMMAND_ACCOUNT_CREATE = 219, @@ -670,8 +679,8 @@ enum RBACPermissions RBAC_PERM_COMMAND_WP_UNLOAD = 772, RBAC_PERM_COMMAND_WP_RELOAD = 773, RBAC_PERM_COMMAND_WP_SHOW = 774, - RBAC_PERM_COMMAND_MODIFY_CURRENCY = 775, // only 6.x - RBAC_PERM_COMMAND_DEBUG_PHASE = 776, // only 6.x + RBAC_PERM_COMMAND_MODIFY_CURRENCY = 775, // not on 3.3.5a + RBAC_PERM_COMMAND_DEBUG_PHASE = 776, // not on 3.3.5a RBAC_PERM_COMMAND_MAILBOX = 777, RBAC_PERM_COMMAND_AHBOT = 778, RBAC_PERM_COMMAND_AHBOT_ITEMS = 779, @@ -694,7 +703,42 @@ enum RBACPermissions RBAC_PERM_COMMAND_INSTANCE_GET_BOSS_STATE = 796, RBAC_PERM_COMMAND_PVPSTATS = 797, RBAC_PERM_COMMAND_MODIFY_XP = 798, - // 799 - 834 6.x only + RBAC_PERM_COMMAND_GO_BUG_TICKET = 799, // not on 3.3.5a + RBAC_PERM_COMMAND_GO_COMPLAINT_TICKET = 800, // not on 3.3.5a + RBAC_PERM_COMMAND_GO_SUGGESTION_TICKET = 801, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_BUG = 802, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_COMPLAINT = 803, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_SUGGESTION = 804, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_BUG_ASSIGN = 805, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_BUG_CLOSE = 806, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_BUG_CLOSEDLIST = 807, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_BUG_COMMENT = 808, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_BUG_DELETE = 809, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_BUG_LIST = 810, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_BUG_UNASSIGN = 811, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_BUG_VIEW = 812, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_COMPLAINT_ASSIGN = 813, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_COMPLAINT_CLOSE = 814, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_COMPLAINT_CLOSEDLIST = 815, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_COMPLAINT_COMMENT = 816, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_COMPLAINT_DELETE = 817, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_COMPLAINT_LIST = 818, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_COMPLAINT_UNASSIGN = 819, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_COMPLAINT_VIEW = 820, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_SUGGESTION_ASSIGN = 821, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_SUGGESTION_CLOSE = 822, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_SUGGESTION_CLOSEDLIST = 823, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_SUGGESTION_COMMENT = 824, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_SUGGESTION_DELETE = 825, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_SUGGESTION_LIST = 826, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_SUGGESTION_UNASSIGN = 827, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_SUGGESTION_VIEW = 828, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_RESET_ALL = 829, // not on 3.3.5a + // 830 reuse + RBAC_PERM_COMMAND_TICKET_RESET_BUG = 831, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_RESET_COMPLAINT = 832, // not on 3.3.5a + RBAC_PERM_COMMAND_TICKET_RESET_SUGGESTION = 833, // not on 3.3.5a + RBAC_PERM_COMMAND_GO_QUEST = 834, // not on 3.3.5a RBAC_PERM_COMMAND_DEBUG_LOADCELLS = 835, RBAC_PERM_COMMAND_DEBUG_BOUNDARY = 836, RBAC_PERM_COMMAND_NPC_EVADE = 837, diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp index 82792a49c96..def6c382893 100644 --- a/src/server/game/Entities/Unit/StatSystem.cpp +++ b/src/server/game/Entities/Unit/StatSystem.cpp @@ -1327,6 +1327,11 @@ void Guardian::UpdateAttackPowerAndDamage(bool ranged) } bonusAP = owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.22f * mod; + if (AuraEffect* aurEff = owner->GetAuraEffectOfRankedSpell(34453, EFFECT_1, owner->GetGUID())) // Animal Handler + { + AddPct(bonusAP, aurEff->GetAmount()); + AddPct(val, aurEff->GetAmount()); + } SetBonusDamage(int32(owner->GetTotalAttackPowerValue(RANGED_ATTACK) * 0.1287f * mod)); } else if (IsPetGhoul() || IsRisenAlly()) //ghouls benefit from deathknight's attack power (may be summon pet or not) diff --git a/src/server/scripts/Commands/cs_server.cpp b/src/server/scripts/Commands/cs_server.cpp index c3ed0d61a6c..47239dba720 100644 --- a/src/server/scripts/Commands/cs_server.cpp +++ b/src/server/scripts/Commands/cs_server.cpp @@ -195,14 +195,10 @@ public: return true; } - static bool AlwaysForceShutdown(WorldSession* mySession) + static bool IsOnlyUser(WorldSession* mySession) { - // if mySession is null then the shutdown command was issued from console (local or remote), always shutdown in this case - if (!mySession) - return true; - // check if there is any session connected from a different address - std::string myAddr = mySession->GetRemoteAddress(); + std::string myAddr = mySession ? mySession->GetRemoteAddress() : ""; SessionMap const& sessions = sWorld->GetAllSessions(); for (SessionMap::value_type const& session : sessions) if (session.second && myAddr != session.second->GetRemoteAddress()) @@ -211,12 +207,12 @@ public: } static bool HandleServerShutDownCommand(ChatHandler* handler, char const* args) { - return ShutdownServer(args, AlwaysForceShutdown(handler->GetSession()) ? SHUTDOWN_MASK_FORCE : 0, SHUTDOWN_EXIT_CODE); + return ShutdownServer(args, IsOnlyUser(handler->GetSession()) ? SHUTDOWN_MASK_FORCE : 0, SHUTDOWN_EXIT_CODE); } static bool HandleServerRestartCommand(ChatHandler* handler, char const* args) { - return ShutdownServer(args, AlwaysForceShutdown(handler->GetSession()) ? (SHUTDOWN_MASK_FORCE | SHUTDOWN_MASK_RESTART) : SHUTDOWN_MASK_RESTART, RESTART_EXIT_CODE); + return ShutdownServer(args, IsOnlyUser(handler->GetSession()) ? (SHUTDOWN_MASK_FORCE | SHUTDOWN_MASK_RESTART) : SHUTDOWN_MASK_RESTART, RESTART_EXIT_CODE); } static bool HandleServerForceShutDownCommand(ChatHandler* /*handler*/, char const* args) @@ -385,8 +381,9 @@ private: if (!ParseExitCode(exitCodeStr, exitCode)) return false; + // Override parameter "delay" with the configuration value if there are still players connected and "force" parameter was not specified if (delay < (int32)sWorld->getIntConfig(CONFIG_FORCE_SHUTDOWN_THRESHOLD) && !(shutdownMask & SHUTDOWN_MASK_FORCE)) - return false; + delay = (int32)sWorld->getIntConfig(CONFIG_FORCE_SHUTDOWN_THRESHOLD); sWorld->ShutdownServ(delay, shutdownMask, static_cast<uint8>(exitCode), std::string(reason)); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index 7e7edfb7832..ce3e68d9c48 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -93,7 +93,7 @@ public: void EnterEvadeMode(EvadeReason /*why*/) override { if (Creature* midnight = ObjectAccessor::GetCreature(*me, _midnightGUID)) - BossAI::_DespawnAtEvade(10, midnight); + BossAI::_DespawnAtEvade(Seconds(10), midnight); me->DespawnOrUnsummon(); } @@ -349,7 +349,7 @@ public: void EnterEvadeMode(EvadeReason /*why*/) override { - BossAI::_DespawnAtEvade(10); + BossAI::_DespawnAtEvade(Seconds(10)); } void KilledUnit(Unit* /*victim*/) override diff --git a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp index 49dfda48a69..38e938fca98 100644 --- a/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp +++ b/src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp @@ -139,10 +139,22 @@ public: ## pyrewood_ambush #######*/ -#define QUEST_PYREWOOD_AMBUSH 452 - -#define NPCSAY_INIT "Get ready, they'll be arriving any minute..." //not blizzlike -#define NPCSAY_END "Thanks for your help!" //not blizzlike +enum PyrewoodAmbush +{ + SAY_PREPARE_TO_AMBUSH = 0, + SAY_A_BLOW_TO_ARUGAL = 1, + FACTION_ENEMY = 168, + QUEST_PYREWOOD_AMBUSH = 452, + COUNCILMAN_SMITHERS = 2060, + COUNCILMAN_THATCHER = 2061, + COUNCILMAN_HENDRICKS = 2062, + COUNCILMAN_WILHELM = 2063, + COUNCILMAN_HARTIN = 2064, + COUNCILMAN_COOPER = 2065, + COUNCILMAN_HIGARTH = 2066, + COUNCILMAN_BRUNSWICK = 2067, + LORD_MAYOR_MORRISON = 2068 +}; static float PyrewoodSpawnPoints[3][4] = { @@ -159,8 +171,6 @@ static float PyrewoodSpawnPoints[3][4] = {-397.94f, 1504.74f, 19.77f, 0}, }; -#define WAIT_SECS 6000 - class pyrewood_ambush : public CreatureScript { public: @@ -189,7 +199,7 @@ public: pyrewood_ambushAI(Creature* creature) : ScriptedAI(creature), Summons(me) { Initialize(); - WaitTimer = WAIT_SECS; + WaitTimer = 6 * IN_MILLISECONDS; QuestInProgress = false; } @@ -210,7 +220,7 @@ public: void Reset() override { - WaitTimer = WAIT_SECS; + WaitTimer = 6 * IN_MILLISECONDS; if (!QuestInProgress) //fix reset values (see UpdateVictim) { @@ -246,7 +256,7 @@ public: if (!target) target = me; - summoned->setFaction(168); + summoned->setFaction(FACTION_ENEMY); summoned->AddThreat(target, 32.0f); summoned->AI()->AttackStart(target); } @@ -279,8 +289,9 @@ public: switch (Phase) { case 0: - if (WaitTimer == WAIT_SECS) - me->Say(NPCSAY_INIT, LANG_UNIVERSAL); //no blizzlike + if (WaitTimer == 6 * IN_MILLISECONDS) + if (Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID)) + Talk(SAY_PREPARE_TO_AMBUSH, player); if (WaitTimer <= diff) { @@ -289,28 +300,28 @@ public: } break; case 1: - SummonCreatureWithRandomTarget(2060, 1); + SummonCreatureWithRandomTarget(COUNCILMAN_SMITHERS, 1); break; case 2: - SummonCreatureWithRandomTarget(2061, 2); - SummonCreatureWithRandomTarget(2062, 0); + SummonCreatureWithRandomTarget(COUNCILMAN_THATCHER, 2); + SummonCreatureWithRandomTarget(COUNCILMAN_HENDRICKS, 0); break; case 3: - SummonCreatureWithRandomTarget(2063, 1); - SummonCreatureWithRandomTarget(2064, 2); - SummonCreatureWithRandomTarget(2065, 0); + SummonCreatureWithRandomTarget(COUNCILMAN_WILHELM, 1); + SummonCreatureWithRandomTarget(COUNCILMAN_HARTIN, 2); + SummonCreatureWithRandomTarget(COUNCILMAN_COOPER, 0); break; case 4: - SummonCreatureWithRandomTarget(2066, 1); - SummonCreatureWithRandomTarget(2067, 0); - SummonCreatureWithRandomTarget(2068, 2); + SummonCreatureWithRandomTarget(COUNCILMAN_HIGARTH, 1); + SummonCreatureWithRandomTarget(COUNCILMAN_BRUNSWICK, 0); + SummonCreatureWithRandomTarget(LORD_MAYOR_MORRISON, 2); break; case 5: //end if (PlayerGUID) { if (Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID)) { - me->Say(NPCSAY_END, LANG_UNIVERSAL); //not blizzlike + Talk(SAY_A_BLOW_TO_ARUGAL); player->GroupEventHappens(QUEST_PYREWOOD_AMBUSH, me); } } |