*Change npc_text entry in guards.cpp

*More work on blackrock_depths

--HG--
branch : trunk
This commit is contained in:
Blaymoira
2008-12-23 11:27:19 +01:00
parent ee67608822
commit 30ff870a4e
2 changed files with 25 additions and 22 deletions
@@ -235,7 +235,7 @@ void SendProfTrainerMenu_guard_azuremyst(Player *player, Creature *_Creature, ui
break; break;
case GOSSIP_ACTION_INFO_DEF + 9: //Jewelcrafting case GOSSIP_ACTION_INFO_DEF + 9: //Jewelcrafting
player->SEND_POI(-3781.55, -11541.8, 6, 6, 0, "Farii"); player->SEND_POI(-3781.55, -11541.8, 6, 6, 0, "Farii");
player->SEND_GOSSIP_MENU(10097,_Creature->GetGUID()); player->SEND_GOSSIP_MENU(10096,_Creature->GetGUID());
break; break;
case GOSSIP_ACTION_INFO_DEF + 10: //Leatherworking case GOSSIP_ACTION_INFO_DEF + 10: //Leatherworking
player->SEND_POI(-3442.68, -12322.2, 6, 6, 0, "Moordo"); player->SEND_POI(-3442.68, -12322.2, 6, 6, 0, "Moordo");
@@ -52,6 +52,8 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
uint64 ShillDinger; uint64 ShillDinger;
uint64 CrestKiller; uint64 CrestKiller;
uint32 state;
bool Encounters[ENCOUNTERS]; bool Encounters[ENCOUNTERS];
void Initialize() void Initialize()
@@ -70,6 +72,8 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
ShillDinger = 0; ShillDinger = 0;
CrestKiller = 0; CrestKiller = 0;
state = 0;
for(uint8 i = 0; i < ENCOUNTERS; i++) for(uint8 i = 0; i < ENCOUNTERS; i++)
Encounters[i] = false; Encounters[i] = false;
} }
@@ -96,7 +100,6 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
uint32 GetData(uint32 type) uint32 GetData(uint32 type)
{ {
uint32 state = 0;
switch(type) switch(type)
{ {
case DATA_DUGHAL: return Encounters[0];break; case DATA_DUGHAL: return Encounters[0];break;
@@ -113,43 +116,43 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
case DATA_GATE_S: return GateShill; break; case DATA_GATE_S: return GateShill; break;
case DATA_CREATURE_JAZ: case DATA_CREATURE_JAZ:
if((((Creature*)Jaz)->isDead())) if((((Creature*)Jaz)->isDead()))
// state = 1; state = 1;
//else else
// state = 0; state = 0;
break; break;
case DATA_CREATURE_OGRABISI: case DATA_CREATURE_OGRABISI:
if((((Creature*)Ograbisi)->isDead())) if((((Creature*)Ograbisi)->isDead()))
// state = 1; state = 1;
//else else
// state = 0; state = 0;
break; break;
case DATA_CREATURE_CREST: case DATA_CREATURE_CREST:
if((((Creature*)CrestKiller)->isDead())) if((((Creature*)CrestKiller)->isDead()))
// state = 1; state = 1;
//else else
// state = 0; state = 0;
break; break;
case DATA_CREATURE_SHILL: case DATA_CREATURE_SHILL:
if((((Creature*)ShillDinger)->isDead())) if((((Creature*)ShillDinger)->isDead()))
// state = 1; state = 1;
//else else
// state = 0; state = 0;
break; break;
} }
return state; return 0;
} }
void OnObjectCreate(GameObject *go) void OnObjectCreate(GameObject *go)
{ {
switch(go->GetEntry()) switch(go->GetEntry())
{ {
case 170561: SupplyRoomGate = go->GetGUID(); go->GetUInt32Value(GAMEOBJECT_STATE); break; case 170561: SupplyRoomGate = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break;
case 170562: GateDughal = go->GetGUID(); break; case 170562: GateDughal = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break;
case 170566: GateTobias = go->GetGUID(); break; case 170566: GateTobias = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break;
case 170567: GateCrest = go->GetGUID(); break; case 170567: GateCrest = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break;
case 170568: GateJaz = go->GetGUID(); break; case 170568: GateJaz = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break;
case 170569: GateShill = go->GetGUID(); break; case 170569: GateShill = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break;
case 166872: SupplyCrate = go->GetGUID(); break; case 166872: SupplyCrate = go->GetGUID(); state = go->GetUInt32Value(GAMEOBJECT_STATE); break;
} }
} }