Add script for quest 12864. Script by manuel

--HG--
branch : trunk
This commit is contained in:
Kudlaty
2009-08-20 20:09:13 +02:00
parent f27fc3e939
commit 7ccc15ec48
9 changed files with 100 additions and 2 deletions
+3
View File
@@ -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;
+1
View File
@@ -0,0 +1 @@
UPDATE `creature_template` SET `npcflag` = `npcflag`|1 WHERE `entry` = 29811;
+1
View File
@@ -0,0 +1 @@
UPDATE `creature_template` SET `ScriptName` = 'npc_frostborn_scout' WHERE `entry` = 29811;
+1
View File
@@ -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
@@ -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"
>
@@ -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"
>
@@ -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();
}
@@ -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();
+8 -2
View File
@@ -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
{