diff options
| author | tkrokli <tkrokli@hotmail.com> | 2016-05-08 19:37:48 +0200 |
|---|---|---|
| committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-01-12 23:37:37 +0100 |
| commit | 34d310aff8ab8fcc1cb30729138e2cf710660636 (patch) | |
| tree | f1760e6eb5272e61ff499e4dab1d0fc88281541d /src/server/scripts/EasternKingdoms | |
| parent | 36a896e28a253b3980c205ce79789f91d47ecbc7 (diff) | |
Core/Scripts: remove hardcoded text from npc_sayge
- remove hardcoded (and wrong) text from the script
- copy valid text from broadcast_text to gossip_menu_option
- gossip_menu / npc_text is already correct in TDB 335.61
- sort + clean up core script enum list and add new entries
- keep gossip handling unchanged in the script (low prio)
(cherry picked from commit 582af025090462f29576988e7a4517fee9a206fe)
Core/Scripts/DB: move npc_gregan_brewspewer to DB
- Remove npc_gregan_brewspewer, thereby removing hardcoded text
`#define GOSSIP_HELLO "Buy somethin', will ya?"`
- Move all gossip handling to DB (gossip texts already exist in TDB)
(cherry picked from commit 3acf6f36d1d60b7e2ac082bf9f6976de3256e250)
Core/Scripts: npc_grandmother gossip text moved to DB
Removing one more hardcoded text line from core scripts.
Also adding correct gossip to the npc_grandmother script.
Gossip changes in this script:
- remove hardcoded text from core script
- use existing npc_text IDs in gossip enum
- add missing text rows to gossip_menu_option
- use values from gossip_menu_option in enum
- replace spawn coordinates 0.0f with GetPosition()
(cherry picked from commit c214f987d730169e106b37fa1fe5f8565609374b)
Core/Scripts: remove hardcoded text from npc_locksmith
- remove hardcoded text from script
- move the gossip handling to DB SQL
- move the script conditions to DB SQL
- use correct gossip from broadcast_text
- remove options not existing in broadcast_text
- add Key to Searing Gorge option (related spell)
- add The Eye of Haramad option (related spell)
(cherry picked from commit e6ee6e2ae85f8a760dcd17e01b388bf3cd27c1e2)
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
| -rw-r--r-- | src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp index a9ff21f4881..63d0d020417 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/bosses_opera.cpp @@ -797,46 +797,44 @@ enum RedRidingHood SAY_WOLF_AGGRO = 0, SAY_WOLF_SLAY = 1, SAY_WOLF_HOOD = 2, + OPTION_WHAT_PHAT_LEWTS_YOU_HAVE = 7443, SOUND_WOLF_DEATH = 9275, SPELL_LITTLE_RED_RIDING_HOOD = 30768, SPELL_TERRIFYING_HOWL = 30752, SPELL_WIDE_SWIPE = 30761, - CREATURE_BIG_BAD_WOLF = 17521, + CREATURE_BIG_BAD_WOLF = 17521 }; - -#define GOSSIP_GRANDMA "What phat lewtz you have grandmother?" - - - class npc_grandmother : public CreatureScript { -public: - npc_grandmother() : CreatureScript("npc_grandmother") { } + public: + npc_grandmother() : CreatureScript("npc_grandmother") { } - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) override - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF) + struct npc_grandmotherAI : public ScriptedAI { - if (Creature* pBigBadWolf = creature->SummonCreature(CREATURE_BIG_BAD_WOLF, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS)) - pBigBadWolf->AI()->AttackStart(player); + npc_grandmotherAI(Creature* creature) : ScriptedAI(creature) { } - creature->DespawnOrUnsummon(); - } - return true; - } + void sGossipSelect(Player* player, uint32 menuId, uint32 gossipListId) override + { + if (menuId == OPTION_WHAT_PHAT_LEWTS_YOU_HAVE && gossipListId == 0) + { + player->CLOSE_GOSSIP_MENU(); - bool OnGossipHello(Player* player, Creature* creature) override - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_GRANDMA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); - player->SEND_GOSSIP_MENU(8990, creature->GetGUID()); + if (Creature* pBigBadWolf = me->SummonCreature(CREATURE_BIG_BAD_WOLF, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), me->GetOrientation(), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS)) + pBigBadWolf->AI()->AttackStart(player); - return true; - } + me->DespawnOrUnsummon(); + } + } + }; + + CreatureAI* GetAI(Creature* creature) const override + { + return new npc_grandmotherAI(creature); + } }; class boss_bigbadwolf : public CreatureScript |
