diff options
-rw-r--r-- | sql/FULL/world_scripts_full.sql | 3 | ||||
-rw-r--r-- | sql/updates/5230_world_TDB.sql | 1 | ||||
-rw-r--r-- | sql/updates/5230_world_scripts.sql | 1 | ||||
-rw-r--r-- | src/bindings/scripts/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/bindings/scripts/VC80/80ScriptDev2.vcproj | 4 | ||||
-rw-r--r-- | src/bindings/scripts/VC90/90ScriptDev2.vcproj | 4 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/northrend/storm_peaks.cpp | 76 | ||||
-rw-r--r-- | src/bindings/scripts/system/ScriptLoader.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellHandler.cpp | 10 |
9 files changed, 100 insertions, 2 deletions
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index be0e1a597c0..75924a7e060 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -864,6 +864,9 @@ UPDATE `creature_template` SET `ScriptName`='npc_deathstalker_erland' WHERE `ent UPDATE `creature_template` SET `ScriptName`='npc_braug_dimspirit' WHERE `entry`=4489; UPDATE `creature_template` SET `ScriptName`='npc_kaya_flathoof' WHERE `entry`=11856; +/* Storm Peaks */ +UPDATE `creature_template` SET `ScriptName` = 'npc_frostborn_scout' WHERE `entry` = 29811; + /* STORMWIND CITY */ UPDATE `creature_template` SET `ScriptName`='npc_archmage_malin' WHERE `entry`=2708; UPDATE `creature_template` SET `ScriptName`='npc_bartleby' WHERE `entry`=6090; diff --git a/sql/updates/5230_world_TDB.sql b/sql/updates/5230_world_TDB.sql new file mode 100644 index 00000000000..cf6f393f3a8 --- /dev/null +++ b/sql/updates/5230_world_TDB.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `npcflag` = `npcflag`|1 WHERE `entry` = 29811;
\ No newline at end of file diff --git a/sql/updates/5230_world_scripts.sql b/sql/updates/5230_world_scripts.sql new file mode 100644 index 00000000000..be2610139ac --- /dev/null +++ b/sql/updates/5230_world_scripts.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName` = 'npc_frostborn_scout' WHERE `entry` = 29811;
\ No newline at end of file diff --git a/src/bindings/scripts/CMakeLists.txt b/src/bindings/scripts/CMakeLists.txt index 5c7752a91a0..6d16d126d26 100644 --- a/src/bindings/scripts/CMakeLists.txt +++ b/src/bindings/scripts/CMakeLists.txt @@ -406,6 +406,7 @@ SET(trinityscript_LIB_SRCS scripts/northrend/grizzly_hills.cpp scripts/northrend/icecrown.cpp scripts/northrend/sholazar_basin.cpp + scripts/northrend/storm_peaks.cpp scripts/northrend/wintergrasp.cpp scripts/northrend/zuldrak.cpp scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp diff --git a/src/bindings/scripts/VC80/80ScriptDev2.vcproj b/src/bindings/scripts/VC80/80ScriptDev2.vcproj index 8734ae1d9f8..440bc0ea946 100644 --- a/src/bindings/scripts/VC80/80ScriptDev2.vcproj +++ b/src/bindings/scripts/VC80/80ScriptDev2.vcproj @@ -2165,6 +2165,10 @@ RelativePath="..\scripts\northrend\sholazar_basin.cpp" > </File> + <File + RelativePath="..\scripts\northrend\storm_peaks.cpp" + > + </File> <File RelativePath="..\scripts\northrend\wintergrasp.cpp" > diff --git a/src/bindings/scripts/VC90/90ScriptDev2.vcproj b/src/bindings/scripts/VC90/90ScriptDev2.vcproj index b12213512f8..80ce6157582 100644 --- a/src/bindings/scripts/VC90/90ScriptDev2.vcproj +++ b/src/bindings/scripts/VC90/90ScriptDev2.vcproj @@ -2162,6 +2162,10 @@ RelativePath="..\scripts\northrend\sholazar_basin.cpp" > </File> + <File + RelativePath="..\scripts\northrend\storm_peaks.cpp" + > + </File> <File RelativePath="..\scripts\northrend\wintergrasp.cpp" > diff --git a/src/bindings/scripts/scripts/northrend/storm_peaks.cpp b/src/bindings/scripts/scripts/northrend/storm_peaks.cpp new file mode 100644 index 00000000000..698cec1a6f9 --- /dev/null +++ b/src/bindings/scripts/scripts/northrend/storm_peaks.cpp @@ -0,0 +1,76 @@ +/* Copyright (C) 2008-2009 Trinity <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, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "precompiled.h" + +/*###### +## npc_frostborn_scout +######*/ + +#define GOSSIP_ITEM1 "Are you okay? I've come to take you back to Frosthold if you can stand." +#define GOSSIP_ITEM2 "I'm sorry that I didn't get here sooner. What happened?" +#define GOSSIP_ITEM3 "I'll go get some help. Hang in there." + +enum +{ + QUEST_MISSING_SCOUTS = 12864 +}; + + +bool GossipHello_npc_frostborn_scout(Player* pPlayer, Creature* pCreature) +{ + + if (pPlayer->GetQuestStatus(QUEST_MISSING_SCOUTS) == QUEST_STATUS_INCOMPLETE) + { + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->PlayerTalkClass->SendGossipMenu(13611, pCreature->GetGUID()); + } + + return true; +} + +bool GossipSelect_npc_frostborn_scout(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) +{ + switch (uiAction) + { + case GOSSIP_ACTION_INFO_DEF+1: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->PlayerTalkClass->SendGossipMenu(13612, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+2: + pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->PlayerTalkClass->SendGossipMenu(13613, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF+3: + pPlayer->PlayerTalkClass->SendGossipMenu(13614, pCreature->GetGUID()); + pPlayer->AreaExploredOrEventHappens(QUEST_MISSING_SCOUTS); + break; + } + + return true; +} + +void AddSC_storm_peaks() +{ + Script* newscript; + + newscript = new Script; + newscript->Name = "npc_frostborn_scout"; + newscript->pGossipHello = &GossipHello_npc_frostborn_scout; + newscript->pGossipSelect = &GossipSelect_npc_frostborn_scout; + newscript->RegisterSelf(); +} diff --git a/src/bindings/scripts/system/ScriptLoader.cpp b/src/bindings/scripts/system/ScriptLoader.cpp index 02a8ef5e375..eb39b80a82b 100644 --- a/src/bindings/scripts/system/ScriptLoader.cpp +++ b/src/bindings/scripts/system/ScriptLoader.cpp @@ -306,6 +306,7 @@ extern void AddSC_dragonblight(); extern void AddSC_grizzly_hills(); extern void AddSC_icecrown(); extern void AddSC_sholazar_basin(); +extern void AddSC_storm_peaks(); extern void AddSC_wintergrasp(); extern void AddSC_zuldrak(); @@ -695,6 +696,7 @@ void AddScripts() AddSC_grizzly_hills(); AddSC_icecrown(); AddSC_sholazar_basin(); + AddSC_storm_peaks(); AddSC_wintergrasp(); AddSC_zuldrak(); diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp index b41a2a0bf46..c67d75a5e66 100644 --- a/src/game/SpellHandler.cpp +++ b/src/game/SpellHandler.cpp @@ -548,7 +548,7 @@ void WorldSession::HandleMirrrorImageDataRequest( WorldPacket & recv_data ) data << (uint8)pCreator->GetByteValue(PLAYER_BYTES, 3); // haircolor data << (uint8)pCreator->GetByteValue(PLAYER_BYTES_2, 0); // facialhair - data << (uint32)0; // unk + data << (uint32)pCreator->GetGuildId(); // unk static const EquipmentSlots ItemSlots[] = { EQUIPMENT_SLOT_HEAD, @@ -566,10 +566,16 @@ void WorldSession::HandleMirrrorImageDataRequest( WorldPacket & recv_data ) }; // Display items in visible slots for (EquipmentSlots const* itr = &ItemSlots[0];*itr!=EQUIPMENT_SLOT_END;++itr) - if (Item const *item = pCreator->GetItemByPos(INVENTORY_SLOT_BAG_0, *itr)) + { + if (*itr == EQUIPMENT_SLOT_HEAD && pCreator->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_HELM)) + data << (uint32)0; + else if (*itr == EQUIPMENT_SLOT_BACK && pCreator->HasFlag(PLAYER_FLAGS, PLAYER_FLAGS_HIDE_CLOAK)) + data << (uint32)0; + else if (Item const *item = pCreator->GetItemByPos(INVENTORY_SLOT_BAG_0, *itr)) data << (uint32)item->GetProto()->DisplayInfoID; else data << (uint32)0; + } } else { |