diff options
11 files changed, 153 insertions, 106 deletions
diff --git a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp index 0d473a5adf1..6c6b0647c5f 100644 --- a/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp +++ b/src/server/scripts/EasternKingdoms/Deadmines/deadmines.cpp @@ -45,12 +45,12 @@ public: player->GetSession()->SendNotification("Instance script not initialized"); return true; } + if (instance->GetData(EVENT_STATE) != CANNON_NOT_USED) return false; + if (targets.GetGOTarget() && targets.GetGOTarget()->GetEntry() == GO_DEFIAS_CANNON) - { instance->SetData(EVENT_STATE, CANNON_GUNPOWDER_USED); - } player->DestroyItemCount(item->GetEntry(), 1, true); return true; diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp index 505bf2cbf5c..8918bca637e 100644 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp @@ -578,7 +578,8 @@ public: temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[16].x, LightofDawnLoc[16].y, LightofDawnLoc[16].z); } JumpToNextStep(10000); - } break; + } + break; case 4: DoScriptText(SAY_LIGHT_OF_DAWN27, me); me->SetStandState(UNIT_STAND_STATE_KNEEL); @@ -938,7 +939,7 @@ public: case 33: // Darion supports to jump to lich king here if (Unit::GetCreature(*me, uiLichKingGUID)) DoCast(me, SPELL_MOGRAINE_CHARGE); // jumping charge - // doesn't make it looks well, so workarounds, Darion charges, looks better + // doesn't make it looks well, so workarounds, Darion charges, looks better me->SetSpeed(MOVE_RUN, 3.0f); me->SetWalk(false); SetHoldState(false); @@ -1309,7 +1310,6 @@ public: case 71: //if (GameObject* go = me->GetMap()->GetGameObject(uiDawnofLightGUID)) // Turn off dawn of light // go->SetPhaseMask(0, true); - { Map* map = me->GetMap(); // search players with in 50 yards for quest credit Map::PlayerList const &PlayerList = map->GetPlayers(); diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp index a5eb76545ee..7922d5fbc24 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp @@ -209,9 +209,7 @@ class boss_akilzon : public CreatureScript for (std::list<Unit*>::const_iterator i = tempUnitMap.begin(); i != tempUnitMap.end(); ++i) { if (!Cloud->IsWithinDist(*i, 6, false)) - { Cloud->CastCustomSpell(*i, 43137, &bp0, NULL, NULL, true, 0, 0, me->GetGUID()); - } } // visual float x, y, z; @@ -311,7 +309,8 @@ class boss_akilzon : public CreatureScript isRaining = true; } - if (ElectricalStorm_Timer <= diff) { + if (ElectricalStorm_Timer <= diff) + { Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50, true); if (!target) { @@ -390,15 +389,11 @@ class boss_akilzon : public CreatureScript class mob_akilzon_eagle : public CreatureScript { public: - - mob_akilzon_eagle() - : CreatureScript("mob_akilzon_eagle") - { - } + mob_akilzon_eagle() : CreatureScript("mob_akilzon_eagle") { } struct mob_akilzon_eagleAI : public ScriptedAI { - mob_akilzon_eagleAI(Creature* creature) : ScriptedAI(creature) {} + mob_akilzon_eagleAI(Creature* creature) : ScriptedAI(creature) { } uint32 EagleSwoop_Timer; bool arrived; @@ -412,7 +407,10 @@ class mob_akilzon_eagle : public CreatureScript me->SetUnitMovementFlags(MOVEMENTFLAG_DISABLE_GRAVITY); } - void EnterCombat(Unit* /*who*/) {DoZoneInCombat();} + void EnterCombat(Unit* /*who*/) + { + DoZoneInCombat(); + } void MoveInLineOfSight(Unit* /*who*/) {} diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp index 683bed46bb0..fa0627df5f3 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp @@ -186,7 +186,10 @@ struct boss_hexlord_addAI : public ScriptedAI void Reset() {} - void EnterCombat(Unit* /*who*/) {DoZoneInCombat();} + void EnterCombat(Unit* /*who*/) + { + DoZoneInCombat(); + } void UpdateAI(const uint32 /*diff*/) { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp index 8419ce50fc7..a2625861f05 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/BattleForMountHyjal/boss_archimonde.cpp @@ -108,7 +108,10 @@ public: void EnterCombat(Unit* /*who*/) {} - void DamageTaken(Unit* /*done_by*/, uint32 &damage) { damage = 0; } + void DamageTaken(Unit* /*done_by*/, uint32 &damage) + { + damage = 0; + } void UpdateAI(const uint32 diff) { @@ -148,9 +151,12 @@ public: void MoveInLineOfSight(Unit* /*who*/) {} void EnterCombat(Unit* /*who*/) {} - void DamageTaken(Unit* /*done_by*/, uint32 &damage) { damage = 0; } - }; + void DamageTaken(Unit* /*done_by*/, uint32 &damage) + { + damage = 0; + } + }; }; /* This is the script for the Doomfire Spirit Mob. This mob simply follow players or @@ -188,7 +194,10 @@ public: void EnterCombat(Unit* /*who*/) {} - void DamageTaken(Unit* /*done_by*/, uint32 &damage) { damage = 0; } + void DamageTaken(Unit* /*done_by*/, uint32 &damage) + { + damage = 0; + } void UpdateAI(const uint32 diff) { diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp index 0e155be515a..6a18c0b493b 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/DarkPortal/dark_portal.cpp @@ -318,11 +318,11 @@ public: void DoSelectSummon() { - uint32 entry = 0; - if ((mRiftWaveCount > 2 && mWaveId < 1) || mRiftWaveCount > 3) mRiftWaveCount = 0; + uint32 entry = 0; + entry = PortalWaves[mWaveId].PortalMob[mRiftWaveCount]; sLog->outDebug(LOG_FILTER_TSCR, "TSCR: npc_time_rift: summoning wave Creature (Wave %u, Entry %u).", mRiftWaveCount, entry); diff --git a/src/server/scripts/Northrend/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp index 078f4321cae..6b6a58f7b38 100644 --- a/src/server/scripts/Northrend/borean_tundra.cpp +++ b/src/server/scripts/Northrend/borean_tundra.cpp @@ -309,7 +309,6 @@ public: bool OnGossipHello(Player* player, Creature* creature) { - if (player->GetQuestStatus(QUEST_SPIRITS_WATCH_OVER_US) == QUEST_STATUS_INCOMPLETE) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_I, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); @@ -588,6 +587,7 @@ public: Phase = 1; go_caribouGUID = 0; } + void EnterCombat(Unit* /*who*/) {} void MoveInLineOfSight(Unit* /*who*/) {} @@ -617,7 +617,6 @@ public: uiPhaseTimer = 2000; Phase = 2; break; - case 2: if (GameObject* go_fur = me->FindNearestGameObject(GO_HIGH_QUALITY_FUR, 11.0f)) me->GetMotionMaster()->MovePoint(0, go_fur->GetPositionX(), go_fur->GetPositionY(), go_fur->GetPositionZ()); @@ -645,7 +644,6 @@ public: uiPhaseTimer = 500; Phase = 7; break; - case 7: { GameObject* go_caribou = NULL; @@ -662,7 +660,7 @@ public: Phase = 8; uiPhaseTimer = 1000; } - break; + break; case 8: DoCast(me, SPELL_TRAPPED, true); Phase = 0; @@ -1017,7 +1015,6 @@ public: void WaypointReached(uint32 uiPointId) { Player* player = GetPlayerForEscort(); - if (!player) return; @@ -1965,8 +1962,7 @@ public: switch (i) { case 29: - if (player) - player->GroupEventHappens(QUEST_GET_ME_OUTA_HERE, me); + player->GroupEventHappens(QUEST_GET_ME_OUTA_HERE, me); break; } } @@ -2036,7 +2032,7 @@ public: uiTimer = 1500; bStarted = false; - GameObject* pTrap; + GameObject* pTrap = NULL; for (uint8 i = 0; i < MammothTrapsNum; ++i) { pTrap = me->FindNearestGameObject(MammothTraps[i], 11.0f); @@ -2071,11 +2067,12 @@ public: void MovementInform(uint32 uiType, uint32 /*uiId*/) { - if (uiType != POINT_MOTION_TYPE) return; + me->DisappearAndDie(); - GameObject* pTrap; + + GameObject* pTrap = NULL; for (uint8 i = 0; i < MammothTrapsNum; ++i) { pTrap = me->FindNearestGameObject(MammothTraps[i], 11.0f); @@ -2150,13 +2147,15 @@ public: struct npc_seaforium_depth_chargeAI : public ScriptedAI { - npc_seaforium_depth_chargeAI(Creature* creature) : ScriptedAI(creature) {} + npc_seaforium_depth_chargeAI(Creature* creature) : ScriptedAI(creature) { } uint32 uiExplosionTimer; + void Reset() { uiExplosionTimer = urand(5000, 10000); } + void UpdateAI(const uint32 diff) { if (uiExplosionTimer < diff) @@ -2229,7 +2228,6 @@ public: if (!UpdateVictim()) return; } - }; CreatureAI* GetAI(Creature* creature) const @@ -2561,31 +2559,31 @@ public: void AddSC_borean_tundra() { - new npc_sinkhole_kill_credit; - new npc_khunok_the_behemoth; - new npc_keristrasza; - new npc_corastrasza; - new npc_iruk; - new mob_nerubar_victim; - new npc_scourge_prisoner; - new npc_jenny; - new npc_fezzix_geartwist; - new npc_nesingwary_trapper; - new npc_lurgglbr; - new npc_nexus_drake_hatchling; - new npc_thassarian; - new npc_image_lich_king; - new npc_counselor_talbot; - new npc_leryssa; - new npc_general_arlos; - new npc_beryl_sorcerer; - new npc_imprisoned_beryl_sorcerer; - new npc_mootoo_the_younger; - new npc_bonker_togglevolt; - new npc_trapped_mammoth_calf; - new npc_magmoth_crusher; - new npc_seaforium_depth_charge; - new npc_valiance_keep_cannoneer; - new npc_warmage_coldarra; - new npc_hidden_cultist; + new npc_sinkhole_kill_credit(); + new npc_khunok_the_behemoth(); + new npc_keristrasza(); + new npc_corastrasza(); + new npc_iruk(); + new mob_nerubar_victim(); + new npc_scourge_prisoner(); + new npc_jenny(); + new npc_fezzix_geartwist(); + new npc_nesingwary_trapper(); + new npc_lurgglbr(); + new npc_nexus_drake_hatchling(); + new npc_thassarian(); + new npc_image_lich_king(); + new npc_counselor_talbot(); + new npc_leryssa(); + new npc_general_arlos(); + new npc_beryl_sorcerer(); + new npc_imprisoned_beryl_sorcerer(); + new npc_mootoo_the_younger(); + new npc_bonker_togglevolt(); + new npc_trapped_mammoth_calf(); + new npc_magmoth_crusher(); + new npc_seaforium_depth_charge(); + new npc_valiance_keep_cannoneer(); + new npc_warmage_coldarra(); + new npc_hidden_cultist(); } diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 6c14a54e42d..8925f2899f5 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -392,7 +392,10 @@ public: GlaiveGUID = 0; } - void EnterCombat(Unit* /*who*/) {DoZoneInCombat();} + void EnterCombat(Unit* /*who*/) + { + DoZoneInCombat(); + } void ChargeCheck() { @@ -2093,7 +2096,6 @@ public: // } } }; - }; class gameobject_cage_trap : public GameObjectScript @@ -2112,7 +2114,6 @@ public: go->SetGoState(GO_STATE_ACTIVE); return true; } - }; class mob_shadow_demon : public CreatureScript @@ -2131,7 +2132,10 @@ public: uint64 TargetGUID; - void EnterCombat(Unit* /*who*/) {DoZoneInCombat();} + void EnterCombat(Unit* /*who*/) + { + DoZoneInCombat(); + } void Reset() { @@ -2165,7 +2169,6 @@ public: DoCast(me->getVictim(), SPELL_CONSUME_SOUL); } }; - }; class mob_blade_of_azzinoth : public CreatureScript @@ -2224,7 +2227,10 @@ public: DoCast(me, SPELL_SHADOWFIEND_PASSIVE, true); } - void EnterCombat(Unit* /*who*/) { DoZoneInCombat(); } + void EnterCombat(Unit* /*who*/) + { + DoZoneInCombat(); + } void DoMeleeAttackIfReady() { @@ -2270,7 +2276,6 @@ public: DoMeleeAttackIfReady(); } }; - }; void AddSC_boss_illidan() diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp index 76c3f04846e..65d59efb9d6 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_lady_vashj.cpp @@ -865,7 +865,6 @@ public: bool OnUse(Player* player, Item* /*item*/, SpellCastTargets const& targets) { InstanceScript* instance = player->GetInstanceScript(); - if (!instance) { player->GetSession()->SendNotification(TEXT_NOT_INITIALIZED); @@ -908,12 +907,8 @@ public: } // get and remove channel - if (Unit* channel = Unit::GetCreature(*vashj, CAST_AI(boss_lady_vashj::boss_lady_vashjAI, vashj->AI())->ShieldGeneratorChannel[channelIdentifier])) - { - // call Unsummon() - channel->setDeathState(JUST_DIED); - } + channel->setDeathState(JUST_DIED); // call Unsummon() instance->SetData(identifier, 1); diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index cb9b6162f0c..ae69744ea2b 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -94,6 +94,7 @@ public: { if (Creature* nether = player->SummonCreature(22408, player->GetPositionX(), player->GetPositionY()+20, player->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000)) nether->AI()->AttackStart(player); + if (Creature* nether = player->SummonCreature(22408, player->GetPositionX(), player->GetPositionY()-20, player->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 180000)) nether->AI()->AttackStart(player); } @@ -340,7 +341,7 @@ public: if (!pMammoth) return false; - GameObject* pTrap; + GameObject* pTrap = NULL; for (uint8 i = 0; i < MammothTrapsNum; ++i) { pTrap = player->FindNearestGameObject(MammothTraps[i], 11.0f); diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 0a04d049eaa..2afa80dd42c 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -83,11 +83,8 @@ there is no difference here (except that default text is chosen with `gameobject #define BOX_UNLEARN_WEAPON_SPEC "Do you really want to unlearn your weaponsmith specialty and lose all associated recipes? \n Cost: " -#define GOSSIP_LEARN_DRAGON "I am absolutely certain that i want to learn dragonscale leatherworking" #define GOSSIP_UNLEARN_DRAGON "I wish to unlearn Dragonscale Leatherworking" -#define GOSSIP_LEARN_ELEMENTAL "I am absolutely certain that i want to learn elemental leatherworking" #define GOSSIP_UNLEARN_ELEMENTAL "I wish to unlearn Elemental Leatherworking" -#define GOSSIP_LEARN_TRIBAL "I am absolutely certain that i want to learn tribal leatherworking" #define GOSSIP_UNLEARN_TRIBAL "I wish to unlearn Tribal Leatherworking" #define BOX_UNLEARN_LEATHER_SPEC "Do you really want to unlearn your leatherworking specialty and lose all associated recipes? \n Cost: " @@ -101,9 +98,6 @@ there is no difference here (except that default text is chosen with `gameobject #define BOX_UNLEARN_TAILOR_SPEC "Do you really want to unlearn your tailoring specialty and lose all associated recipes? \n Cost: " -#define GOSSIP_LEARN_GOBLIN "I am absolutely certain that i want to learn Goblin engineering" -#define GOSSIP_LEARN_GNOMISH "I am absolutely certain that i want to learn Gnomish engineering" - /*### # spells defines ###*/ @@ -387,8 +381,10 @@ public: { if (creature->isQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); + if (creature->isVendor()) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + if (creature->isTrainer()) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); @@ -512,10 +508,21 @@ public: player->PlayerTalkClass->ClearMenus(); switch (sender) { - case GOSSIP_SENDER_MAIN: SendActionMenu(player, creature, action); break; - case GOSSIP_SENDER_LEARN: SendConfirmLearn(player, creature, action); break; - case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn(player, creature, action); break; - case GOSSIP_SENDER_CHECK: SendActionMenu(player, creature, action); break; + case GOSSIP_SENDER_MAIN: + SendActionMenu(player, creature, action); + break; + + case GOSSIP_SENDER_LEARN: + SendConfirmLearn(player, creature, action); + break; + + case GOSSIP_SENDER_UNLEARN: + SendConfirmUnlearn(player, creature, action); + break; + + case GOSSIP_SENDER_CHECK: + SendActionMenu(player, creature, action); + break; } return true; } @@ -539,8 +546,10 @@ public: { if (creature->isQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); + if (creature->isVendor()) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + if (creature->isTrainer()) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); @@ -729,10 +738,21 @@ public: player->PlayerTalkClass->ClearMenus(); switch (sender) { - case GOSSIP_SENDER_MAIN: SendActionMenu(player, creature, action); break; - case GOSSIP_SENDER_LEARN: SendConfirmLearn(player, creature, action); break; - case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn(player, creature, action); break; - case GOSSIP_SENDER_CHECK: SendActionMenu(player, creature, action); break; + case GOSSIP_SENDER_MAIN: + SendActionMenu(player, creature, action); + break; + + case GOSSIP_SENDER_LEARN: + SendConfirmLearn(player, creature, action); + break; + + case GOSSIP_SENDER_UNLEARN: + SendConfirmUnlearn(player, creature, action); + break; + + case GOSSIP_SENDER_CHECK: + SendActionMenu(player, creature, action); + break; } return true; } @@ -763,7 +783,6 @@ enum eEngineeringTrinkets #define GOSSIP_ITEM_ZAP "[PH] Unknown" #define GOSSIP_ITEM_JHORDY "I must build a beacon for this marvelous device!" #define GOSSIP_ITEM_KABLAM "[PH] Unknown" -#define GOSSIP_ITEM_SMILES "[PH] Unknown" class npc_engineering_tele_trinket : public CreatureScript { @@ -866,8 +885,10 @@ public: { if (creature->isQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); + if (creature->isVendor()) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + if (creature->isTrainer()) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); @@ -953,9 +974,17 @@ public: player->PlayerTalkClass->ClearMenus(); switch (sender) { - case GOSSIP_SENDER_MAIN: SendActionMenu(player, creature, action); break; - case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn(player, creature, action); break; - case GOSSIP_SENDER_CHECK: SendActionMenu(player, creature, action); break; + case GOSSIP_SENDER_MAIN: + SendActionMenu(player, creature, action); + break; + + case GOSSIP_SENDER_UNLEARN: + SendConfirmUnlearn(player, creature, action); + break; + + case GOSSIP_SENDER_CHECK: + SendActionMenu(player, creature, action); + break; } return true; } @@ -979,8 +1008,10 @@ public: { if (creature->isQuestGiver()) player->PrepareQuestMenu(creature->GetGUID()); + if (creature->isVendor()) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_TEXT_BROWSE_GOODS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE); + if (creature->isTrainer()) player->ADD_GOSSIP_ITEM(GOSSIP_ICON_TRAINER, GOSSIP_TEXT_TRAIN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRAIN); @@ -1105,24 +1136,31 @@ public: player->PlayerTalkClass->ClearMenus(); switch (sender) { - case GOSSIP_SENDER_MAIN: SendActionMenu(player, creature, action); break; - case GOSSIP_SENDER_LEARN: SendConfirmLearn(player, creature, action); break; - case GOSSIP_SENDER_UNLEARN: SendConfirmUnlearn(player, creature, action); break; - case GOSSIP_SENDER_CHECK: SendActionMenu(player, creature, action); break; + case GOSSIP_SENDER_MAIN: + SendActionMenu(player, creature, action); + break; + + case GOSSIP_SENDER_LEARN: + SendConfirmLearn(player, creature, action); + break; + + case GOSSIP_SENDER_UNLEARN: + SendConfirmUnlearn(player, creature, action); + break; + + case GOSSIP_SENDER_CHECK: + SendActionMenu(player, creature, action); + break; } return true; } }; -/*### -# -###*/ - void AddSC_npc_professions() { - new npc_prof_alchemy; - new npc_prof_blacksmith; - new npc_engineering_tele_trinket; - new npc_prof_leather; - new npc_prof_tailor; + new npc_prof_alchemy(); + new npc_prof_blacksmith(); + new npc_engineering_tele_trinket(); + new npc_prof_leather(); + new npc_prof_tailor(); } |