diff options
| -rw-r--r-- | sql/updates/world/3.3.5/2020_01_03_01_world.sql | 13 | ||||
| -rw-r--r-- | src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp | 63 | 
2 files changed, 46 insertions, 30 deletions
diff --git a/sql/updates/world/3.3.5/2020_01_03_01_world.sql b/sql/updates/world/3.3.5/2020_01_03_01_world.sql new file mode 100644 index 00000000000..db15abb5b04 --- /dev/null +++ b/sql/updates/world/3.3.5/2020_01_03_01_world.sql @@ -0,0 +1,13 @@ +--  +UPDATE `creature_template` SET `gossip_menu_id`=301 WHERE `entry`=3849; +UPDATE `creature_template` SET `gossip_menu_id`=300 WHERE `entry`=3850; + +DELETE FROM `gossip_menu` WHERE `MenuID` IN (21213, 21214, 300, 301) AND `TextID` IN (798,799); +INSERT INTO `gossip_menu` (`MenuID`, `TextID`) VALUES +(300,798), +(301,799); + +DELETE FROM `gossip_menu_option` WHERE `MenuID` IN (21213, 21214, 300, 301); +INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionText`, `OptionBroadcastTextID`, `OptionType`, `OptionNpcFlag`, `ActionMenuID`, `ActionPoiID`, `BoxCoded`, `BoxMoney`, `BoxText`, BoxBroadcastTextID, `VerifiedBuild`) VALUES +(300, 0, 0, "Please unlock the courtyard door.", 2802, 1, 1, 0, 0, 0, 0, "", 0, 0), +(301, 0, 0, "Please unlock the courtyard door.", 2802, 1, 1, 0, 0, 0, 0, "", 0, 0); diff --git a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp index 146855e8261..4918d11356c 100644 --- a/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp +++ b/src/server/scripts/EasternKingdoms/ShadowfangKeep/shadowfang_keep.cpp @@ -77,36 +77,39 @@ public:          void WaypointReached(uint32 waypointId, uint32 /*pathId*/) override          { -            switch (waypointId) +            if (Player* player = GetPlayerForEscort())              { -                case 0: -                    if (me->GetEntry() == NPC_ASH) -                        Talk(SAY_FREE_AS); -                    else -                        Talk(SAY_FREE_AD); -                    break; -                case 10: -                    if (me->GetEntry() == NPC_ASH) -                        Talk(SAY_OPEN_DOOR_AS); -                    else -                        Talk(SAY_OPEN_DOOR_AD); -                    break; -                case 11: -                    if (me->GetEntry() == NPC_ASH) -                        DoCast(me, SPELL_UNLOCK); -                    break; -                case 12: -                    if (me->GetEntry() == NPC_ASH) -                        Talk(SAY_POST_DOOR_AS); -                    else -                        Talk(SAY_POST1_DOOR_AD); - -                    instance->SetData(TYPE_FREE_NPC, DONE); -                    break; -                case 13: -                    if (me->GetEntry() != NPC_ASH) -                        Talk(SAY_POST2_DOOR_AD); -                    break; +                switch (waypointId) +                { +                    case 0: +                        if (me->GetEntry() == NPC_ASH) +                            Talk(SAY_FREE_AS, player); +                        else +                            Talk(SAY_FREE_AD, player); +                        break; +                    case 10: +                        if (me->GetEntry() == NPC_ASH) +                            Talk(SAY_OPEN_DOOR_AS, player); +                        else +                            Talk(SAY_OPEN_DOOR_AD, player); +                        break; +                    case 11: +                        if (me->GetEntry() == NPC_ASH) +                            DoCast(me, SPELL_UNLOCK); +                        break; +                    case 12: +                        if (me->GetEntry() == NPC_ASH) +                            Talk(SAY_POST_DOOR_AS, player); +                        else +                            Talk(SAY_POST1_DOOR_AD, player); + +                        instance->SetData(TYPE_FREE_NPC, DONE); +                        break; +                    case 13: +                        if (me->GetEntry() != NPC_ASH) +                            Talk(SAY_POST2_DOOR_AD, player); +                        break; +                }              }          } @@ -120,7 +123,7 @@ public:              if (action == GOSSIP_ACTION_INFO_DEF + 1)              {                  CloseGossipMenuFor(player); -                Start(false, false); +                Start(false, false, player->GetGUID());              }              return true;          }  | 
