Core: Start cleaning up hungarian notation - Phase1: pCreature -> creature

This commit is contained in:
click
2011-07-02 22:18:03 +02:00
parent 3ddc1cc4c4
commit f91ee24184
345 changed files with 3642 additions and 3642 deletions

View File

@@ -135,21 +135,21 @@ public:
return true;
}
Creature* pCreature = new Creature;
if (!pCreature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, (uint32)teamval, x, y, z, o))
Creature* creature = new Creature;
if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, (uint32)teamval, x, y, z, o))
{
delete pCreature;
delete creature;
return false;
}
pCreature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
uint32 db_guid = pCreature->GetDBTableGUIDLow();
uint32 db_guid = creature->GetDBTableGUIDLow();
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
pCreature->LoadFromDB(db_guid, map);
creature->LoadFromDB(db_guid, map);
map->Add(pCreature);
map->Add(creature);
sObjectMgr->AddCreatureToGrid(db_guid, sObjectMgr->GetCreatureData(db_guid));
return true;
}
@@ -217,15 +217,15 @@ public:
uint32 lowguid = atoi((char*)guid_str);
Creature* pCreature = NULL;
Creature* creature = NULL;
/* FIXME: impossible without entry
if (lowguid)
pCreature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), MAKE_GUID(lowguid, HIGHGUID_UNIT));
creature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), MAKE_GUID(lowguid, HIGHGUID_UNIT));
*/
// attempt check creature existence by DB data
if (!pCreature)
if (!creature)
{
CreatureData const* data = sObjectMgr->GetCreatureData(lowguid);
if (!data)
@@ -238,7 +238,7 @@ public:
else
{
// obtain real GUID for DB operations
lowguid = pCreature->GetDBTableGUIDLow();
lowguid = creature->GetDBTableGUIDLow();
}
int wait = wait_str ? atoi(wait_str) : 0;
@@ -252,16 +252,16 @@ public:
// update movement type
WorldDatabase.PExecute("UPDATE creature SET MovementType = '%u' WHERE guid = '%u'", WAYPOINT_MOTION_TYPE, lowguid);
if (pCreature && pCreature->GetWaypointPath())
if (creature && creature->GetWaypointPath())
{
pCreature->SetDefaultMovementType(WAYPOINT_MOTION_TYPE);
pCreature->GetMotionMaster()->Initialize();
if (pCreature->isAlive()) // dead creature will reset movement generator at respawn
creature->SetDefaultMovementType(WAYPOINT_MOTION_TYPE);
creature->GetMotionMaster()->Initialize();
if (creature->isAlive()) // dead creature will reset movement generator at respawn
{
pCreature->setDeathState(JUST_DIED);
pCreature->Respawn(true);
creature->setDeathState(JUST_DIED);
creature->Respawn(true);
}
pCreature->SaveToDB();
creature->SaveToDB();
}
handler->SendSysMessage(LANG_WAYPOINT_ADDED);
@@ -322,29 +322,29 @@ public:
return false;
}
Creature* pCreature = handler->getSelectedCreature();
if (!pCreature)
Creature* creature = handler->getSelectedCreature();
if (!creature)
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
if (pCreature->isPet())
if (creature->isPet())
{
if (((Pet*)pCreature)->getPetType() == HUNTER_PET)
if (((Pet*)creature)->getPetType() == HUNTER_PET)
{
pCreature->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, sObjectMgr->GetXPForLevel(lvl)/4);
pCreature->SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
creature->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, sObjectMgr->GetXPForLevel(lvl)/4);
creature->SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
}
((Pet*)pCreature)->GivePetLevel(lvl);
((Pet*)creature)->GivePetLevel(lvl);
}
else
{
pCreature->SetMaxHealth(100 + 30*lvl);
pCreature->SetHealth(100 + 30*lvl);
pCreature->SetLevel(lvl);
pCreature->SaveToDB();
creature->SetMaxHealth(100 + 30*lvl);
creature->SetHealth(100 + 30*lvl);
creature->SetLevel(lvl);
creature->SaveToDB();
}
return true;
@@ -439,28 +439,28 @@ public:
return false;
}
Creature* pCreature = handler->getSelectedCreature();
Creature* creature = handler->getSelectedCreature();
if (!pCreature)
if (!creature)
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
pCreature->setFaction(factionId);
creature->setFaction(factionId);
// faction is set in creature_template - not inside creature
// update in memory
if (CreatureTemplate const *cinfo = pCreature->GetCreatureInfo())
if (CreatureTemplate const *cinfo = creature->GetCreatureInfo())
{
const_cast<CreatureTemplate*>(cinfo)->faction_A = factionId;
const_cast<CreatureTemplate*>(cinfo)->faction_H = factionId;
}
// and DB
WorldDatabase.PExecute("UPDATE creature_template SET faction_A = '%u', faction_H = '%u' WHERE entry = '%u'", factionId, factionId, pCreature->GetEntry());
WorldDatabase.PExecute("UPDATE creature_template SET faction_A = '%u', faction_H = '%u' WHERE entry = '%u'", factionId, factionId, creature->GetEntry());
return true;
}
@@ -473,18 +473,18 @@ public:
uint32 npcFlags = (uint32) atoi((char*)args);
Creature* pCreature = handler->getSelectedCreature();
Creature* creature = handler->getSelectedCreature();
if (!pCreature)
if (!creature)
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
pCreature->SetUInt32Value(UNIT_NPC_FLAGS, npcFlags);
creature->SetUInt32Value(UNIT_NPC_FLAGS, npcFlags);
WorldDatabase.PExecute("UPDATE creature_template SET npcflag = '%u' WHERE entry = '%u'", npcFlags, pCreature->GetEntry());
WorldDatabase.PExecute("UPDATE creature_template SET npcflag = '%u' WHERE entry = '%u'", npcFlags, creature->GetEntry());
handler->SendSysMessage(LANG_VALUE_SAVED_REJOIN);
@@ -563,9 +563,9 @@ public:
{
uint32 lowguid = 0;
Creature* pCreature = handler->getSelectedCreature();
Creature* creature = handler->getSelectedCreature();
if (!pCreature)
if (!creature)
{
// number or [name] Shift-click form |color|Hcreature:creature_guid|h[name]|h|r
char* cId = handler->extractKeyFromLink((char*)args, "Hcreature");
@@ -576,11 +576,11 @@ public:
/* FIXME: impossible without entry
if (lowguid)
pCreature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), MAKE_GUID(lowguid, HIGHGUID_UNIT));
creature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), MAKE_GUID(lowguid, HIGHGUID_UNIT));
*/
// Attempting creature load from DB data
if (!pCreature)
if (!creature)
{
CreatureData const* data = sObjectMgr->GetCreatureData(lowguid);
if (!data)
@@ -601,12 +601,12 @@ public:
}
else
{
lowguid = pCreature->GetDBTableGUIDLow();
lowguid = creature->GetDBTableGUIDLow();
}
}
else
{
lowguid = pCreature->GetDBTableGUIDLow();
lowguid = creature->GetDBTableGUIDLow();
}
float x = handler->GetSession()->GetPlayer()->GetPositionX();
@@ -614,21 +614,21 @@ public:
float z = handler->GetSession()->GetPlayer()->GetPositionZ();
float o = handler->GetSession()->GetPlayer()->GetOrientation();
if (pCreature)
if (creature)
{
if (CreatureData const* data = sObjectMgr->GetCreatureData(pCreature->GetDBTableGUIDLow()))
if (CreatureData const* data = sObjectMgr->GetCreatureData(creature->GetDBTableGUIDLow()))
{
const_cast<CreatureData*>(data)->posX = x;
const_cast<CreatureData*>(data)->posY = y;
const_cast<CreatureData*>(data)->posZ = z;
const_cast<CreatureData*>(data)->orientation = o;
}
pCreature->GetMap()->CreatureRelocation(pCreature, x, y, z, o);
pCreature->GetMotionMaster()->Initialize();
if (pCreature->isAlive()) // dead creature will reset movement generator at respawn
creature->GetMap()->CreatureRelocation(creature, x, y, z, o);
creature->GetMotionMaster()->Initialize();
if (creature->isAlive()) // dead creature will reset movement generator at respawn
{
pCreature->setDeathState(JUST_DIED);
pCreature->Respawn();
creature->setDeathState(JUST_DIED);
creature->Respawn();
}
}
@@ -667,19 +667,19 @@ public:
uint32 displayId = (uint32) atoi((char*)args);
Creature* pCreature = handler->getSelectedCreature();
Creature* creature = handler->getSelectedCreature();
if (!pCreature || pCreature->isPet())
if (!creature || creature->isPet())
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
pCreature->SetDisplayId(displayId);
pCreature->SetNativeDisplayId(displayId);
creature->SetDisplayId(displayId);
creature->SetNativeDisplayId(displayId);
pCreature->SaveToDB();
creature->SaveToDB();
return true;
}
@@ -718,7 +718,7 @@ public:
return false;
uint32 lowguid = 0;
Creature* pCreature = NULL;
Creature* creature = NULL;
if (dontdel_str)
{
@@ -752,10 +752,10 @@ public:
if (!type_str) // case .setmovetype $move_type (with selected creature)
{
type_str = guid_str;
pCreature = handler->getSelectedCreature();
if (!pCreature || pCreature->isPet())
creature = handler->getSelectedCreature();
if (!creature || creature->isPet())
return false;
lowguid = pCreature->GetDBTableGUIDLow();
lowguid = creature->GetDBTableGUIDLow();
}
else // case .setmovetype #creature_guid $move_type (with selected creature)
{
@@ -763,11 +763,11 @@ public:
/* impossible without entry
if (lowguid)
pCreature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), MAKE_GUID(lowguid, HIGHGUID_UNIT));
creature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), MAKE_GUID(lowguid, HIGHGUID_UNIT));
*/
// attempt check creature existence by DB data
if (!pCreature)
if (!creature)
{
CreatureData const* data = sObjectMgr->GetCreatureData(lowguid);
if (!data)
@@ -779,12 +779,12 @@ public:
}
else
{
lowguid = pCreature->GetDBTableGUIDLow();
lowguid = creature->GetDBTableGUIDLow();
}
}
// now lowguid is low guid really existed creature
// and pCreature point (maybe) to this creature or NULL
// and creature point (maybe) to this creature or NULL
MovementGeneratorType move_type;
@@ -803,20 +803,20 @@ public:
//if (doNotDelete == false)
// WaypointMgr.DeletePath(lowguid);
if (pCreature)
if (creature)
{
// update movement type
if (doNotDelete == false)
pCreature->LoadPath(0);
creature->LoadPath(0);
pCreature->SetDefaultMovementType(move_type);
pCreature->GetMotionMaster()->Initialize();
if (pCreature->isAlive()) // dead creature will reset movement generator at respawn
creature->SetDefaultMovementType(move_type);
creature->GetMotionMaster()->Initialize();
if (creature->isAlive()) // dead creature will reset movement generator at respawn
{
pCreature->setDeathState(JUST_DIED);
pCreature->Respawn();
creature->setDeathState(JUST_DIED);
creature->Respawn();
}
pCreature->SaveToDB();
creature->SaveToDB();
}
if (doNotDelete == false)
{
@@ -845,18 +845,18 @@ public:
return false;
}
Creature* pCreature = handler->getSelectedCreature();
if (!pCreature)
Creature* creature = handler->getSelectedCreature();
if (!creature)
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
pCreature->SetPhaseMask(phasemask, true);
creature->SetPhaseMask(phasemask, true);
if (!pCreature->isPet())
pCreature->SaveToDB();
if (!creature->isPet())
creature->SaveToDB();
return true;
}
@@ -878,21 +878,21 @@ public:
if (option >0.0f)
mtype = RANDOM_MOTION_TYPE;
Creature* pCreature = handler->getSelectedCreature();
Creature* creature = handler->getSelectedCreature();
uint32 u_guidlow = 0;
if (pCreature)
u_guidlow = pCreature->GetDBTableGUIDLow();
if (creature)
u_guidlow = creature->GetDBTableGUIDLow();
else
return false;
pCreature->SetRespawnRadius((float)option);
pCreature->SetDefaultMovementType(mtype);
pCreature->GetMotionMaster()->Initialize();
if (pCreature->isAlive()) // dead creature will reset movement generator at respawn
creature->SetRespawnRadius((float)option);
creature->SetDefaultMovementType(mtype);
creature->GetMotionMaster()->Initialize();
if (creature->isAlive()) // dead creature will reset movement generator at respawn
{
pCreature->setDeathState(JUST_DIED);
pCreature->Respawn();
creature->setDeathState(JUST_DIED);
creature->Respawn();
}
WorldDatabase.PExecute("UPDATE creature SET spawndist=%f, MovementType=%i WHERE guid=%u", option, mtype, u_guidlow);
@@ -920,16 +920,16 @@ public:
return false;
}
Creature* pCreature = handler->getSelectedCreature();
Creature* creature = handler->getSelectedCreature();
uint32 u_guidlow = 0;
if (pCreature)
u_guidlow = pCreature->GetDBTableGUIDLow();
if (creature)
u_guidlow = creature->GetDBTableGUIDLow();
else
return false;
WorldDatabase.PExecute("UPDATE creature SET spawntimesecs=%i WHERE guid=%u", i_stime, u_guidlow);
pCreature->SetRespawnDelay((uint32)i_stime);
creature->SetRespawnDelay((uint32)i_stime);
handler->PSendSysMessage(LANG_COMMAND_SPAWNTIME, i_stime);
return true;
@@ -940,23 +940,23 @@ public:
if (!*args)
return false;
Creature* pCreature = handler->getSelectedCreature();
if (!pCreature)
Creature* creature = handler->getSelectedCreature();
if (!creature)
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
pCreature->MonsterSay(args, LANG_UNIVERSAL, 0);
creature->MonsterSay(args, LANG_UNIVERSAL, 0);
// make some emotes
char lastchar = args[strlen(args) - 1];
switch(lastchar)
{
case '?': pCreature->HandleEmoteCommand(EMOTE_ONESHOT_QUESTION); break;
case '!': pCreature->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION); break;
default: pCreature->HandleEmoteCommand(EMOTE_ONESHOT_TALK); break;
case '?': creature->HandleEmoteCommand(EMOTE_ONESHOT_QUESTION); break;
case '!': creature->HandleEmoteCommand(EMOTE_ONESHOT_EXCLAMATION); break;
default: creature->HandleEmoteCommand(EMOTE_ONESHOT_TALK); break;
}
return true;
@@ -968,16 +968,16 @@ public:
if (!*args)
return false;
Creature* pCreature = handler->getSelectedCreature();
Creature* creature = handler->getSelectedCreature();
if (!pCreature)
if (!creature)
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
pCreature->MonsterTextEmote(args, 0);
creature->MonsterTextEmote(args, 0);
return true;
}
@@ -1030,9 +1030,9 @@ public:
char* text = strtok(NULL, "");
uint64 guid = handler->GetSession()->GetPlayer()->GetSelection();
Creature* pCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(guid);
Creature* creature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(guid);
if (!pCreature || !receiver_str || !text)
if (!creature || !receiver_str || !text)
{
return false;
}
@@ -1043,7 +1043,7 @@ public:
if (handler->HasLowerSecurity(sObjectMgr->GetPlayer(receiver_guid), 0))
return false;
pCreature->MonsterWhisper(text, receiver_guid);
creature->MonsterWhisper(text, receiver_guid);
return true;
}
@@ -1053,18 +1053,18 @@ public:
if (!*args)
return false;
Creature* pCreature = handler->getSelectedCreature();
if (!pCreature)
Creature* creature = handler->getSelectedCreature();
if (!creature)
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
pCreature->MonsterYell(args, LANG_UNIVERSAL, 0);
creature->MonsterYell(args, LANG_UNIVERSAL, 0);
// make an emote
pCreature->HandleEmoteCommand(EMOTE_ONESHOT_SHOUT);
creature->HandleEmoteCommand(EMOTE_ONESHOT_SHOUT);
return true;
}
@@ -1162,19 +1162,19 @@ public:
return false;
uint32 leaderGUID = (uint32) atoi((char*)args);
Creature* pCreature = handler->getSelectedCreature();
Creature* creature = handler->getSelectedCreature();
if (!pCreature || !pCreature->GetDBTableGUIDLow())
if (!creature || !creature->GetDBTableGUIDLow())
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
uint32 lowguid = pCreature->GetDBTableGUIDLow();
if (pCreature->GetFormation())
uint32 lowguid = creature->GetDBTableGUIDLow();
if (creature->GetFormation())
{
handler->PSendSysMessage("Selected creature is already member of group %u", pCreature->GetFormation()->GetId());
handler->PSendSysMessage("Selected creature is already member of group %u", creature->GetFormation()->GetId());
return false;
}
@@ -1185,13 +1185,13 @@ public:
FormationInfo *group_member;
group_member = new FormationInfo;
group_member->follow_angle = (pCreature->GetAngle(chr) - chr->GetOrientation()) * 180 / M_PI;
group_member->follow_dist = sqrtf(pow(chr->GetPositionX() - pCreature->GetPositionX(), int(2))+pow(chr->GetPositionY()-pCreature->GetPositionY(), int(2)));
group_member->follow_angle = (creature->GetAngle(chr) - chr->GetOrientation()) * 180 / M_PI;
group_member->follow_dist = sqrtf(pow(chr->GetPositionX() - creature->GetPositionX(), int(2))+pow(chr->GetPositionY() - creature->GetPositionY(), int(2)));
group_member->leaderGUID = leaderGUID;
group_member->groupAI = 0;
CreatureGroupMap[lowguid] = group_member;
pCreature->SearchFormation();
creature->SearchFormation();
WorldDatabase.PExecute("INSERT INTO creature_formations (leaderGUID, memberGUID, dist, angle, groupAI) VALUES ('%u', '%u', '%f', '%f', '%u')",
leaderGUID, lowguid, group_member->follow_dist, group_member->follow_angle, group_member->groupAI);
@@ -1208,30 +1208,30 @@ public:
uint32 linkguid = (uint32) atoi((char*)args);
Creature* pCreature = handler->getSelectedCreature();
Creature* creature = handler->getSelectedCreature();
if (!pCreature)
if (!creature)
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
handler->SetSentErrorMessage(true);
return false;
}
if (!pCreature->GetDBTableGUIDLow())
if (!creature->GetDBTableGUIDLow())
{
handler->PSendSysMessage("Selected creature %u isn't in creature table", pCreature->GetGUIDLow());
handler->PSendSysMessage("Selected creature %u isn't in creature table", creature->GetGUIDLow());
handler->SetSentErrorMessage(true);
return false;
}
if (!sObjectMgr->SetCreatureLinkedRespawn(pCreature->GetDBTableGUIDLow(), linkguid))
if (!sObjectMgr->SetCreatureLinkedRespawn(creature->GetDBTableGUIDLow(), linkguid))
{
handler->PSendSysMessage("Selected creature can't link with guid '%u'", linkguid);
handler->SetSentErrorMessage(true);
return false;
}
handler->PSendSysMessage("LinkGUID '%u' added to creature with DBTableGUID: '%u'", linkguid, pCreature->GetDBTableGUIDLow());
handler->PSendSysMessage("LinkGUID '%u' added to creature with DBTableGUID: '%u'", linkguid, creature->GetDBTableGUIDLow());
return true;
}
@@ -1248,9 +1248,9 @@ public:
return true;
}
Creature* pCreature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), guid);
Creature* creature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), guid);
if (!pCreature)
if (!creature)
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
return true;
@@ -1275,15 +1275,15 @@ public:
switch(SlotID)
{
case 1:
pCreature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, ItemID);
creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY, ItemID);
added = true;
break;
case 2:
pCreature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY_01, ItemID);
creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY_01, ItemID);
added = true;
break;
case 3:
pCreature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY_02, ItemID);
creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_DISPLAY_02, ItemID);
added = true;
break;
default:
@@ -1333,19 +1333,19 @@ public:
return true;
}
Creature* pCreature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), guid);
Creature* creature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), guid);
if (!pCreature)
if (!creature)
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
return true;
}
pCreature->SetName(args);
uint32 idname = sObjectMgr->AddCreatureTemplate(pCreature->GetName());
pCreature->SetUInt32Value(OBJECT_FIELD_ENTRY, idname);
creature->SetName(args);
uint32 idname = sObjectMgr->AddCreatureTemplate(creature->GetName());
creature->SetUInt32Value(OBJECT_FIELD_ENTRY, idname);
pCreature->SaveToDB();
creature->SaveToDB();
*/
return true;
@@ -1380,18 +1380,18 @@ public:
return true;
}
Creature* pCreature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), guid);
Creature* creature = ObjectAccessor::GetCreature(*handler->GetSession()->GetPlayer(), guid);
if (!pCreature)
if (!creature)
{
handler->SendSysMessage(LANG_SELECT_CREATURE);
return true;
}
uint32 idname = sObjectMgr->AddCreatureSubName(pCreature->GetName(), args, pCreature->GetUInt32Value(UNIT_FIELD_DISPLAYID));
pCreature->SetUInt32Value(OBJECT_FIELD_ENTRY, idname);
uint32 idname = sObjectMgr->AddCreatureSubName(creature->GetName(), args, creature->GetUInt32Value(UNIT_FIELD_DISPLAYID));
creature->SetUInt32Value(OBJECT_FIELD_ENTRY, idname);
pCreature->SaveToDB();
creature->SaveToDB();
*/
return true;
}

View File

@@ -740,9 +740,9 @@ public:
{
Field *fields = result2->Fetch();
uint32 wpguid = fields[0].GetUInt32();
Creature* pCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(wpguid, VISUAL_WAYPOINT, HIGHGUID_UNIT));
Creature* creature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(wpguid, VISUAL_WAYPOINT, HIGHGUID_UNIT));
if (!pCreature)
if (!creature)
{
handler->PSendSysMessage(LANG_WAYPOINT_NOTREMOVED, wpguid);
hasError = true;
@@ -750,9 +750,9 @@ public:
}
else
{
pCreature->CombatStop();
pCreature->DeleteFromDB();
pCreature->AddObjectToRemoveList();
creature->CombatStop();
creature->DeleteFromDB();
creature->AddObjectToRemoveList();
}
}
@@ -831,22 +831,22 @@ public:
float o = chr->GetOrientation();
Map *map = chr->GetMap();
Creature* pCreature = new Creature;
if (!pCreature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
Creature* creature = new Creature;
if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
{
handler->PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, id);
delete pCreature;
delete creature;
return false;
}
pCreature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
pCreature->LoadFromDB(pCreature->GetDBTableGUIDLow(), map);
map->Add(pCreature);
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
creature->LoadFromDB(creature->GetDBTableGUIDLow(), map);
map->Add(creature);
if (target)
{
pCreature->SetDisplayId(target->GetDisplayId());
pCreature->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5);
creature->SetDisplayId(target->GetDisplayId());
creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5);
}
return true;
@@ -879,22 +879,22 @@ public:
float o = chr->GetOrientation();
Map *map = chr->GetMap();
Creature* pCreature = new Creature;
if (!pCreature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
Creature* creature = new Creature;
if (!creature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
{
handler->PSendSysMessage(LANG_WAYPOINT_NOTCREATED, id);
delete pCreature;
delete creature;
return false;
}
pCreature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
pCreature->LoadFromDB(pCreature->GetDBTableGUIDLow(), map);
map->Add(pCreature);
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
creature->LoadFromDB(creature->GetDBTableGUIDLow(), map);
map->Add(creature);
if (target)
{
pCreature->SetDisplayId(target->GetDisplayId());
pCreature->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5);
creature->SetDisplayId(target->GetDisplayId());
creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 0.5);
}
return true;
@@ -914,8 +914,8 @@ public:
{
Field *fields = result->Fetch();
uint32 guid = fields[0].GetUInt32();
Creature* pCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(guid, VISUAL_WAYPOINT, HIGHGUID_UNIT));
if (!pCreature)
Creature* creature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(guid, VISUAL_WAYPOINT, HIGHGUID_UNIT));
if (!creature)
{
handler->PSendSysMessage(LANG_WAYPOINT_NOTREMOVED, guid);
hasError = true;
@@ -923,9 +923,9 @@ public:
}
else
{
pCreature->CombatStop();
pCreature->DeleteFromDB();
pCreature->AddObjectToRemoveList();
creature->CombatStop();
creature->DeleteFromDB();
creature->AddObjectToRemoveList();
}
}
while (result->NextRow());

View File

@@ -143,9 +143,9 @@ class npc_grimstone : public CreatureScript
public:
npc_grimstone() : CreatureScript("npc_grimstone") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_grimstoneAI(pCreature);
return new npc_grimstoneAI(creature);
}
struct npc_grimstoneAI : public npc_escortAI
@@ -384,9 +384,9 @@ class mob_phalanx : public CreatureScript
public:
mob_phalanx() : CreatureScript("mob_phalanx") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_phalanxAI (pCreature);
return new mob_phalanxAI (creature);
}
struct mob_phalanxAI : public ScriptedAI
@@ -467,43 +467,43 @@ class npc_kharan_mighthammer : public CreatureScript
public:
npc_kharan_mighthammer() : CreatureScript("npc_kharan_mighthammer") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
pPlayer->SEND_GOSSIP_MENU(2475, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2475, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
pPlayer->SEND_GOSSIP_MENU(2476, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2476, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
pPlayer->SEND_GOSSIP_MENU(2477, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2477, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
pPlayer->SEND_GOSSIP_MENU(2478, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2478, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
pPlayer->SEND_GOSSIP_MENU(2479, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2479, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+6:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7);
pPlayer->SEND_GOSSIP_MENU(2480, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2480, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+7:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8);
pPlayer->SEND_GOSSIP_MENU(2481, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2481, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+8:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9);
pPlayer->SEND_GOSSIP_MENU(2482, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2482, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+9:
pPlayer->CLOSE_GOSSIP_MENU();
@@ -516,10 +516,10 @@ public:
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
if (creature->isQuestGiver())
pPlayer->PrepareQuestMenu(creature->GetGUID());
if (pPlayer->GetQuestStatus(QUEST_4001) == QUEST_STATUS_INCOMPLETE)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
@@ -528,9 +528,9 @@ public:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KHARAN_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
if (pPlayer->GetTeam() == HORDE)
pPlayer->SEND_GOSSIP_MENU(2473, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2473, creature->GetGUID());
else
pPlayer->SEND_GOSSIP_MENU(2474, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2474, creature->GetGUID());
return true;
}
@@ -565,7 +565,7 @@ class npc_lokhtos_darkbargainer : public CreatureScript
public:
npc_lokhtos_darkbargainer() : CreatureScript("npc_lokhtos_darkbargainer") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
@@ -574,17 +574,17 @@ public:
pPlayer->CastSpell(pPlayer, SPELL_CREATE_THORIUM_BROTHERHOOD_CONTRACT_DND, false);
}
if (uiAction == GOSSIP_ACTION_TRADE)
pPlayer->GetSession()->SendListInventory(pCreature->GetGUID());
pPlayer->GetSession()->SendListInventory(creature->GetGUID());
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
if (creature->isQuestGiver())
pPlayer->PrepareQuestMenu(creature->GetGUID());
if (pCreature->isVendor() && pPlayer->GetReputationRank(59) >= REP_FRIENDLY)
if (creature->isVendor() && pPlayer->GetReputationRank(59) >= REP_FRIENDLY)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_VENDOR, GOSSIP_ITEM_SHOW_ACCESS, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_TRADE);
if (pPlayer->GetQuestRewardStatus(QUEST_A_BINDING_CONTRACT) != 1 &&
@@ -595,9 +595,9 @@ public:
}
if (pPlayer->GetReputationRank(59) < REP_FRIENDLY)
pPlayer->SEND_GOSSIP_MENU(3673, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(3673, creature->GetGUID());
else
pPlayer->SEND_GOSSIP_MENU(3677, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(3677, creature->GetGUID());
return true;
}
@@ -622,9 +622,9 @@ class npc_dughal_stormwing : public CreatureScript
public:
npc_dughal_stormwing() : CreatureScript("npc_dughal_stormwing") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
npc_dughal_stormwingAI* dughal_stormwingAI = new npc_dughal_stormwingAI(pCreature);
npc_dughal_stormwingAI* dughal_stormwingAI = new npc_dughal_stormwingAI(creature);
dughal_stormwingAI->AddWaypoint(0, 280.42f, -82.86f, -77.12f, 0);
dughal_stormwingAI->AddWaypoint(1, 287.64f, -87.01f, -76.79f, 0);
@@ -633,25 +633,25 @@ public:
return dughal_stormwingAI;
}
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 uiSender, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
{
pPlayer->CLOSE_GOSSIP_MENU();
CAST_AI(npc_escort::npc_escortAI, (pCreature->AI()))->Start(false, true, pPlayer->GetGUID());
pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(false, true, pPlayer->GetGUID());
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
pInstance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_IN_PROGRESS);
}
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
if (pPlayer->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE && pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS)
{
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_DUGHAL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
pPlayer->SEND_GOSSIP_MENU(2846, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2846, creature->GetGUID());
}
return true;
}
@@ -733,9 +733,9 @@ class npc_marshal_windsor : public CreatureScript
public:
npc_marshal_windsor() : CreatureScript("npc_marshal_windsor") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
npc_marshal_windsorAI* marshal_windsorAI = new npc_marshal_windsorAI(pCreature);
npc_marshal_windsorAI* marshal_windsorAI = new npc_marshal_windsorAI(creature);
marshal_windsorAI->AddWaypoint(0, 316.336f, -225.528f, -77.7258f, 7000);
marshal_windsorAI->AddWaypoint(1, 316.336f, -225.528f, -77.7258f, 2000);
@@ -761,15 +761,15 @@ public:
return marshal_windsorAI;
}
bool OnQuestAccept(Player* pPlayer, Creature* pCreature, Quest const *quest)
bool OnQuestAccept(Player* pPlayer, Creature* creature, Quest const *quest)
{
if (quest->GetQuestId() == 4322)
{PlayerStart = player;
if (pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_NOT_STARTED)
{
CAST_AI(npc_escort::npc_escortAI, (pCreature->AI()))->Start(true, false, pPlayer->GetGUID());
CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(true, false, pPlayer->GetGUID());
pInstance->SetData(DATA_QUEST_JAIL_BREAK, ENCOUNTER_STATE_IN_PROGRESS);
pCreature->setFaction(11);
creature->setFaction(11);
}
}
@@ -907,9 +907,9 @@ class npc_marshal_reginald_windsor : public CreatureScript
public:
npc_marshal_reginald_windsor() : CreatureScript("npc_marshal_reginald_windsor") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
npc_marshal_reginald_windsorAI* marshal_reginald_windsorAI = new npc_marshal_reginald_windsorAI(pCreature);
npc_marshal_reginald_windsorAI* marshal_reginald_windsorAI = new npc_marshal_reginald_windsorAI(creature);
marshal_reginald_windsorAI->AddWaypoint(0, 403.61f, -52.71f, -63.92f, 4000);
marshal_reginald_windsorAI->AddWaypoint(1, 403.61f, -52.71f, -63.92f, 4000);
@@ -1110,9 +1110,9 @@ class npc_tobias_seecher : public CreatureScript
public:
npc_tobias_seecher() : CreatureScript("npc_tobias_seecher") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
npc_tobias_seecherAI* tobias_seecherAI = new npc_tobias_seecherAI(pCreature);
npc_tobias_seecherAI* tobias_seecherAI = new npc_tobias_seecherAI(creature);
tobias_seecherAI->AddWaypoint(0, 549.21f, -281.07f, -75.27f);
tobias_seecherAI->AddWaypoint(1, 554.39f, -267.39f, -73.68f);
@@ -1123,25 +1123,25 @@ public:
return tobias_seecherAI;
}
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 uiSender, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
{
pPlayer->CLOSE_GOSSIP_MENU();
CAST_AI(npc_escort::npc_escortAI, (pCreature->AI()))->Start(false, true, pPlayer->GetGUID());
pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
CAST_AI(npc_escort::npc_escortAI, (creature->AI()))->Start(false, true, pPlayer->GetGUID());
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
pInstance->SetData(DATA_TOBIAS, ENCOUNTER_STATE_IN_PROGRESS);
}
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
if (pPlayer->GetQuestStatus(QUEST_JAIL_BREAK) == QUEST_STATUS_INCOMPLETE && pInstance->GetData(DATA_QUEST_JAIL_BREAK) == ENCOUNTER_STATE_IN_PROGRESS)
{
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Get out of here, Tobias, you're free!", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
pPlayer->SEND_GOSSIP_MENU(2847, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2847, creature->GetGUID());
}
return true;
}

View File

@@ -35,9 +35,9 @@ class boss_ambassador_flamelash : public CreatureScript
public:
boss_ambassador_flamelash() : CreatureScript("boss_ambassador_flamelash") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_ambassador_flamelashAI (pCreature);
return new boss_ambassador_flamelashAI (creature);
}
struct boss_ambassador_flamelashAI : public ScriptedAI

View File

@@ -39,9 +39,9 @@ class boss_anubshiah : public CreatureScript
public:
boss_anubshiah() : CreatureScript("boss_anubshiah") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_anubshiahAI (pCreature);
return new boss_anubshiahAI (creature);
}
struct boss_anubshiahAI : public ScriptedAI

View File

@@ -42,9 +42,9 @@ class boss_emperor_dagran_thaurissan : public CreatureScript
public:
boss_emperor_dagran_thaurissan() : CreatureScript("boss_emperor_dagran_thaurissan") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_draganthaurissanAI (pCreature);
return new boss_draganthaurissanAI (creature);
}
struct boss_draganthaurissanAI : public ScriptedAI

View File

@@ -37,9 +37,9 @@ class boss_general_angerforge : public CreatureScript
public:
boss_general_angerforge() : CreatureScript("boss_general_angerforge") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_general_angerforgeAI (pCreature);
return new boss_general_angerforgeAI (creature);
}
struct boss_general_angerforgeAI : public ScriptedAI

View File

@@ -36,9 +36,9 @@ class boss_gorosh_the_dervish : public CreatureScript
public:
boss_gorosh_the_dervish() : CreatureScript("boss_gorosh_the_dervish") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_gorosh_the_dervishAI (pCreature);
return new boss_gorosh_the_dervishAI (creature);
}
struct boss_gorosh_the_dervishAI : public ScriptedAI

View File

@@ -36,9 +36,9 @@ class boss_grizzle : public CreatureScript
public:
boss_grizzle() : CreatureScript("boss_grizzle") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_grizzleAI (pCreature);
return new boss_grizzleAI (creature);
}
struct boss_grizzleAI : public ScriptedAI

View File

@@ -38,9 +38,9 @@ class boss_high_interrogator_gerstahn : public CreatureScript
public:
boss_high_interrogator_gerstahn() : CreatureScript("boss_high_interrogator_gerstahn") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_high_interrogator_gerstahnAI (pCreature);
return new boss_high_interrogator_gerstahnAI (creature);
}
struct boss_high_interrogator_gerstahnAI : public ScriptedAI

View File

@@ -41,9 +41,9 @@ class boss_magmus : public CreatureScript
public:
boss_magmus() : CreatureScript("boss_magmus") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_magmusAI (pCreature);
return new boss_magmusAI (creature);
}
struct boss_magmusAI : public ScriptedAI

View File

@@ -40,9 +40,9 @@ class boss_moira_bronzebeard : public CreatureScript
public:
boss_moira_bronzebeard() : CreatureScript("boss_moira_bronzebeard") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_moira_bronzebeardAI (pCreature);
return new boss_moira_bronzebeardAI (creature);
}
struct boss_moira_bronzebeardAI : public ScriptedAI

View File

@@ -52,26 +52,26 @@ class boss_gloomrel : public CreatureScript
public:
boss_gloomrel() : CreatureScript("boss_gloomrel") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
pPlayer->SEND_GOSSIP_MENU(2606, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2606, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+11:
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer, SPELL_LEARN_SMELT, false);
creature->CastSpell(pPlayer, SPELL_LEARN_SMELT, false);
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
pPlayer->SEND_GOSSIP_MENU(2604, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2604, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+22:
pPlayer->CLOSE_GOSSIP_MENU();
if (InstanceScript* pInstance = pCreature->GetInstanceScript())
if (InstanceScript* pInstance = creature->GetInstanceScript())
{
//are 5 minutes expected? go template may have data to despawn when used at quest
pInstance->DoRespawnGameObject(pInstance->GetData64(DATA_GO_CHALICE), MINUTE*5);
@@ -81,7 +81,7 @@ public:
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
if (pPlayer->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) == 1 && pPlayer->GetSkillValue(SKILL_MINING) >= DATA_SKILLPOINT_MIN && !pPlayer->HasSpell(SPELL_SMELT_DARK_IRON))
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TEACH_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
@@ -89,7 +89,7 @@ public:
if (pPlayer->GetQuestRewardStatus(QUEST_SPECTRAL_CHALICE) == 0 && pPlayer->GetSkillValue(SKILL_MINING) >= DATA_SKILLPOINT_MIN)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRIBUTE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(creature), creature->GetGUID());
return true;
}
@@ -112,22 +112,22 @@ class boss_doomrel : public CreatureScript
public:
boss_doomrel() : CreatureScript("boss_doomrel") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_DOOMREL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
pPlayer->SEND_GOSSIP_MENU(2605, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2605, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->CLOSE_GOSSIP_MENU();
//start event here
pCreature->setFaction(FACTION_HOSTILE);
pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
pCreature->AI()->AttackStart(pPlayer);
InstanceScript* pInstance = pCreature->GetInstanceScript();
creature->setFaction(FACTION_HOSTILE);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
creature->AI()->AttackStart(pPlayer);
InstanceScript* pInstance = creature->GetInstanceScript();
if (pInstance)
pInstance->SetData64(DATA_EVENSTARTER, pPlayer->GetGUID());
break;
@@ -135,17 +135,17 @@ public:
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_CHALLENGE, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
pPlayer->SEND_GOSSIP_MENU(2601, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2601, creature->GetGUID());
return true;
}
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_doomrelAI (pCreature);
return new boss_doomrelAI (creature);
}
struct boss_doomrelAI : public ScriptedAI

View File

@@ -38,9 +38,9 @@ class boss_broodlord : public CreatureScript
public:
boss_broodlord() : CreatureScript("boss_broodlord") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_broodlordAI (pCreature);
return new boss_broodlordAI (creature);
}
struct boss_broodlordAI : public ScriptedAI

View File

@@ -64,9 +64,9 @@ class boss_chromaggus : public CreatureScript
public:
boss_chromaggus() : CreatureScript("boss_chromaggus") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_chromaggusAI (pCreature);
return new boss_chromaggusAI (creature);
}
struct boss_chromaggusAI : public ScriptedAI

View File

@@ -35,9 +35,9 @@ class boss_ebonroc : public CreatureScript
public:
boss_ebonroc() : CreatureScript("boss_ebonroc") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_ebonrocAI (pCreature);
return new boss_ebonrocAI (creature);
}
struct boss_ebonrocAI : public ScriptedAI

View File

@@ -34,9 +34,9 @@ class boss_firemaw : public CreatureScript
public:
boss_firemaw() : CreatureScript("boss_firemaw") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_firemawAI (pCreature);
return new boss_firemawAI (creature);
}
struct boss_firemawAI : public ScriptedAI

View File

@@ -36,9 +36,9 @@ class boss_flamegor : public CreatureScript
public:
boss_flamegor() : CreatureScript("boss_flamegor") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_flamegorAI (pCreature);
return new boss_flamegorAI (creature);
}
struct boss_flamegorAI : public ScriptedAI

View File

@@ -65,9 +65,9 @@ class boss_nefarian : public CreatureScript
public:
boss_nefarian() : CreatureScript("boss_nefarian") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_nefarianAI (pCreature);
return new boss_nefarianAI (creature);
}
struct boss_nefarianAI : public ScriptedAI

View File

@@ -42,9 +42,9 @@ class boss_razorgore : public CreatureScript
public:
boss_razorgore() : CreatureScript("boss_razorgore") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_razorgoreAI (pCreature);
return new boss_razorgoreAI (creature);
}
struct boss_razorgoreAI : public ScriptedAI

View File

@@ -45,38 +45,38 @@ class boss_vaelastrasz : public CreatureScript
public:
boss_vaelastrasz() : CreatureScript("boss_vaelastrasz") { }
void SendDefaultMenu(Player* pPlayer, Creature* pCreature, uint32 uiAction)
void SendDefaultMenu(Player* pPlayer, Creature* creature, uint32 uiAction)
{
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1) //Fight time
{
pPlayer->CLOSE_GOSSIP_MENU();
CAST_AI(boss_vaelastrasz::boss_vaelAI, pCreature->AI())->BeginSpeech(pPlayer);
CAST_AI(boss_vaelastrasz::boss_vaelAI, creature->AI())->BeginSpeech(pPlayer);
}
}
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 uiSender, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
if (uiSender == GOSSIP_SENDER_MAIN)
SendDefaultMenu(pPlayer, pCreature, uiAction);
SendDefaultMenu(pPlayer, creature, uiAction);
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
if (creature->isQuestGiver())
pPlayer->PrepareQuestMenu(creature->GetGUID());
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
pPlayer->SEND_GOSSIP_MENU(907, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(907, creature->GetGUID());
return true;
}
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_vaelAI (pCreature);
return new boss_vaelAI (creature);
}
struct boss_vaelAI : public ScriptedAI

View File

@@ -74,38 +74,38 @@ class boss_victor_nefarius : public CreatureScript
public:
boss_victor_nefarius() : CreatureScript("boss_victor_nefarius") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
pPlayer->SEND_GOSSIP_MENU(7198, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(7198, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
pPlayer->SEND_GOSSIP_MENU(7199, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(7199, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
pPlayer->CLOSE_GOSSIP_MENU();
DoScriptText(SAY_GAMESBEGIN_1, pCreature);
CAST_AI(boss_victor_nefarius::boss_victor_nefariusAI, pCreature->AI())->BeginEvent(pPlayer);
DoScriptText(SAY_GAMESBEGIN_1, creature);
CAST_AI(boss_victor_nefarius::boss_victor_nefariusAI, creature->AI())->BeginEvent(pPlayer);
break;
}
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1 , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
pPlayer->SEND_GOSSIP_MENU(7134, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(7134, creature->GetGUID());
return true;
}
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_victor_nefariusAI (pCreature);
return new boss_victor_nefariusAI (creature);
}
struct boss_victor_nefariusAI : public ScriptedAI

View File

@@ -42,16 +42,16 @@ class boss_mr_smite : public CreatureScript
public:
boss_mr_smite() : CreatureScript("boss_mr_smite") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_mr_smiteAI (pCreature);
return new boss_mr_smiteAI (creature);
}
struct boss_mr_smiteAI : public ScriptedAI
{
boss_mr_smiteAI(Creature* pCreature) : ScriptedAI(pCreature)
boss_mr_smiteAI(Creature* creature) : ScriptedAI(creature)
{
pInstance = pCreature->GetInstanceScript();
pInstance = creature->GetInstanceScript();
}
InstanceScript* pInstance;

View File

@@ -90,45 +90,45 @@ class npc_blastmaster_emi_shortfuse : public CreatureScript
public:
npc_blastmaster_emi_shortfuse() : CreatureScript("npc_blastmaster_emi_shortfuse") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_blastmaster_emi_shortfuseAI(pCreature);
return new npc_blastmaster_emi_shortfuseAI(creature);
}
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
if (npc_escortAI* pEscortAI = CAST_AI(npc_blastmaster_emi_shortfuse::npc_blastmaster_emi_shortfuseAI, pCreature->AI()))
if (npc_escortAI* pEscortAI = CAST_AI(npc_blastmaster_emi_shortfuse::npc_blastmaster_emi_shortfuseAI, creature->AI()))
pEscortAI->Start(true, false, pPlayer->GetGUID());
pCreature->setFaction(pPlayer->getFaction());
pCreature->AI()->SetData(1, 0);
creature->setFaction(pPlayer->getFaction());
creature->AI()->SetData(1, 0);
pPlayer->CLOSE_GOSSIP_MENU();
}
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
InstanceScript* pInstance = pCreature->GetInstanceScript();
InstanceScript* pInstance = creature->GetInstanceScript();
if (pInstance && pInstance->GetData(TYPE_EVENT) == NOT_STARTED)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_START_EVENT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_EMI, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_EMI, creature->GetGUID());
return true;
}
struct npc_blastmaster_emi_shortfuseAI : public npc_escortAI
{
npc_blastmaster_emi_shortfuseAI(Creature* pCreature) : npc_escortAI(pCreature)
npc_blastmaster_emi_shortfuseAI(Creature* creature) : npc_escortAI(creature)
{
pInstance = pCreature->GetInstanceScript();
pCreature->RestoreFaction();
pInstance = creature->GetInstanceScript();
creature->RestoreFaction();
Reset();
}
@@ -548,14 +548,14 @@ class boss_grubbis : public CreatureScript
public:
boss_grubbis() : CreatureScript("boss_grubbis") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_grubbisAI(pCreature);
return new boss_grubbisAI(creature);
}
struct boss_grubbisAI : public ScriptedAI
{
boss_grubbisAI(Creature* pCreature) : ScriptedAI(pCreature)
boss_grubbisAI(Creature* creature) : ScriptedAI(creature)
{
SetDataSummoner();
}

View File

@@ -48,9 +48,9 @@ class boss_curator : public CreatureScript
public:
boss_curator() : CreatureScript("boss_curator") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_curatorAI (pCreature);
return new boss_curatorAI (creature);
}
struct boss_curatorAI : public ScriptedAI

View File

@@ -44,9 +44,9 @@ class boss_maiden_of_virtue : public CreatureScript
public:
boss_maiden_of_virtue() : CreatureScript("boss_maiden_of_virtue") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_maiden_of_virtueAI (pCreature);
return new boss_maiden_of_virtueAI (creature);
}
struct boss_maiden_of_virtueAI : public ScriptedAI

View File

@@ -51,9 +51,9 @@ class boss_attumen : public CreatureScript
public:
boss_attumen() : CreatureScript("boss_attumen") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_attumenAI (pCreature);
return new boss_attumenAI (creature);
}
struct boss_attumenAI : public ScriptedAI
@@ -112,9 +112,9 @@ class boss_midnight : public CreatureScript
public:
boss_midnight() : CreatureScript("boss_midnight") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_midnightAI(pCreature);
return new boss_midnightAI(creature);
}
struct boss_midnightAI : public ScriptedAI

View File

@@ -65,9 +65,9 @@ class boss_moroes : public CreatureScript
public:
boss_moroes() : CreatureScript("boss_moroes") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_moroesAI (pCreature);
return new boss_moroesAI (creature);
}
struct boss_moroesAI : public ScriptedAI
@@ -155,7 +155,7 @@ public:
DeSpawnAdds();
if (isAddlistEmpty())
{
Creature* pCreature = NULL;
Creature* creature = NULL;
std::vector<uint32> AddList;
for (uint8 i = 0; i < 6; ++i)
@@ -169,10 +169,10 @@ public:
{
uint32 entry = *itr;
pCreature = me->SummonCreature(entry, Locations[i][0], Locations[i][1], POS_Z, Locations[i][2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
if (pCreature)
creature = me->SummonCreature(entry, Locations[i][0], Locations[i][1], POS_Z, Locations[i][2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
if (creature)
{
AddGUID[i] = pCreature->GetGUID();
AddGUID[i] = creature->GetGUID();
AddId[i] = entry;
}
++i;
@@ -181,10 +181,10 @@ public:
{
for (uint8 i = 0; i < 4; ++i)
{
Creature* pCreature = me->SummonCreature(AddId[i], Locations[i][0], Locations[i][1], POS_Z, Locations[i][2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
if (pCreature)
Creature* creature = me->SummonCreature(AddId[i], Locations[i][0], Locations[i][1], POS_Z, Locations[i][2], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
if (creature)
{
AddGUID[i] = pCreature->GetGUID();
AddGUID[i] = creature->GetGUID();
}
}
}
@@ -409,9 +409,9 @@ class boss_baroness_dorothea_millstipe : public CreatureScript
public:
boss_baroness_dorothea_millstipe() : CreatureScript("boss_baroness_dorothea_millstipe") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_baroness_dorothea_millstipeAI (pCreature);
return new boss_baroness_dorothea_millstipeAI (creature);
}
struct boss_baroness_dorothea_millstipeAI : public boss_moroes_guestAI
@@ -473,9 +473,9 @@ class boss_baron_rafe_dreuger : public CreatureScript
public:
boss_baron_rafe_dreuger() : CreatureScript("boss_baron_rafe_dreuger") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_baron_rafe_dreugerAI (pCreature);
return new boss_baron_rafe_dreugerAI (creature);
}
struct boss_baron_rafe_dreugerAI : public boss_moroes_guestAI
@@ -531,9 +531,9 @@ class boss_lady_catriona_von_indi : public CreatureScript
public:
boss_lady_catriona_von_indi() : CreatureScript("boss_lady_catriona_von_indi") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_lady_catriona_von_indiAI (pCreature);
return new boss_lady_catriona_von_indiAI (creature);
}
struct boss_lady_catriona_von_indiAI : public boss_moroes_guestAI
@@ -602,9 +602,9 @@ class boss_lady_keira_berrybuck : public CreatureScript
public:
boss_lady_keira_berrybuck() : CreatureScript("boss_lady_keira_berrybuck") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_lady_keira_berrybuckAI (pCreature);
return new boss_lady_keira_berrybuckAI (creature);
}
struct boss_lady_keira_berrybuckAI : public boss_moroes_guestAI
@@ -677,9 +677,9 @@ class boss_lord_robin_daris : public CreatureScript
public:
boss_lord_robin_daris() : CreatureScript("boss_lord_robin_daris") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_lord_robin_darisAI (pCreature);
return new boss_lord_robin_darisAI (creature);
}
struct boss_lord_robin_darisAI : public boss_moroes_guestAI
@@ -734,9 +734,9 @@ class boss_lord_crispin_ference : public CreatureScript
public:
boss_lord_crispin_ference() : CreatureScript("boss_lord_crispin_ference") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_lord_crispin_ferenceAI (pCreature);
return new boss_lord_crispin_ferenceAI (creature);
}
struct boss_lord_crispin_ferenceAI : public boss_moroes_guestAI

View File

@@ -63,9 +63,9 @@ class boss_netherspite : public CreatureScript
public:
boss_netherspite() : CreatureScript("boss_netherspite") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_netherspiteAI(pCreature);
return new boss_netherspiteAI(creature);
}
struct boss_netherspiteAI : public ScriptedAI

View File

@@ -63,9 +63,9 @@ class boss_nightbane : public CreatureScript
public:
boss_nightbane() : CreatureScript("boss_nightbane") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_nightbaneAI (pCreature);
return new boss_nightbaneAI (creature);
}
struct boss_nightbaneAI : public ScriptedAI

View File

@@ -101,9 +101,9 @@ class netherspite_infernal : public CreatureScript
public:
netherspite_infernal() : CreatureScript("netherspite_infernal") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new netherspite_infernalAI (pCreature);
return new netherspite_infernalAI (creature);
}
struct netherspite_infernalAI : public ScriptedAI
@@ -176,9 +176,9 @@ class boss_malchezaar : public CreatureScript
public:
boss_malchezaar() : CreatureScript("boss_malchezaar") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_malchezaarAI (pCreature);
return new boss_malchezaarAI (creature);
}
struct boss_malchezaarAI : public ScriptedAI

View File

@@ -86,9 +86,9 @@ class boss_shade_of_aran : public CreatureScript
public:
boss_shade_of_aran() : CreatureScript("boss_shade_of_aran") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_aranAI (pCreature);
return new boss_aranAI (creature);
}
struct boss_aranAI : public ScriptedAI
@@ -516,9 +516,9 @@ class mob_aran_elemental : public CreatureScript
public:
mob_aran_elemental() : CreatureScript("mob_aran_elemental") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new water_elementalAI (pCreature);
return new water_elementalAI (creature);
}
struct water_elementalAI : public ScriptedAI
@@ -555,10 +555,10 @@ class mob_shadow_of_aran : public CreatureScript
public:
mob_shadow_of_aran() : CreatureScript("mob_shadow_of_aran") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
sLog->outString("TSCR: Convert simpleAI script for Creature Entry %u to ACID", pCreature->GetEntry());
SimpleAI* ai = new SimpleAI (pCreature);
sLog->outString("TSCR: Convert simpleAI script for Creature Entry %u to ACID", creature->GetEntry());
SimpleAI* ai = new SimpleAI (creature);
ai->Spell[0].Enabled = true;
ai->Spell[0].Spell_Id = SPELL_SHADOW_PYRO;

View File

@@ -61,9 +61,9 @@ class mob_kilrek : public CreatureScript
public:
mob_kilrek() : CreatureScript("mob_kilrek") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_kilrekAI (pCreature);
return new mob_kilrekAI (creature);
}
struct mob_kilrekAI : public ScriptedAI
@@ -133,9 +133,9 @@ class mob_demon_chain : public CreatureScript
public:
mob_demon_chain() : CreatureScript("mob_demon_chain") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_demon_chainAI(pCreature);
return new mob_demon_chainAI(creature);
}
struct mob_demon_chainAI : public ScriptedAI
@@ -171,9 +171,9 @@ class mob_fiendish_portal : public CreatureScript
public:
mob_fiendish_portal() : CreatureScript("mob_fiendish_portal") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_fiendish_portalAI (pCreature);
return new mob_fiendish_portalAI (creature);
}
struct mob_fiendish_portalAI : public PassiveAI
@@ -208,9 +208,9 @@ class mob_fiendish_imp : public CreatureScript
public:
mob_fiendish_imp() : CreatureScript("mob_fiendish_imp") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_fiendish_impAI (pCreature);
return new mob_fiendish_impAI (creature);
}
struct mob_fiendish_impAI : public ScriptedAI
@@ -251,9 +251,9 @@ class boss_terestian_illhoof : public CreatureScript
public:
boss_terestian_illhoof() : CreatureScript("boss_terestian_illhoof") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_terestianAI (pCreature);
return new boss_terestianAI (creature);
}
struct boss_terestianAI : public ScriptedAI

View File

@@ -88,16 +88,16 @@ EndScriptData */
#define CREATURE_CYCLONE 18412
#define CREATURE_CRONE 18168
void SummonCroneIfReady(InstanceScript* pInstance, Creature* pCreature)
void SummonCroneIfReady(InstanceScript* pInstance, Creature* creature)
{
pInstance->SetData(DATA_OPERA_OZ_DEATHCOUNT, SPECIAL); // Increment DeathCount
if (pInstance->GetData(DATA_OPERA_OZ_DEATHCOUNT) == 4)
{
if (Creature* pCrone = pCreature->SummonCreature(CREATURE_CRONE, -10891.96f, -1755.95f, pCreature->GetPositionZ(), 4.64f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS))
if (Creature* pCrone = creature->SummonCreature(CREATURE_CRONE, -10891.96f, -1755.95f, creature->GetPositionZ(), 4.64f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS))
{
if (pCreature->getVictim())
pCrone->AI()->AttackStart(pCreature->getVictim());
if (creature->getVictim())
pCrone->AI()->AttackStart(creature->getVictim());
}
}
};
@@ -107,9 +107,9 @@ class boss_dorothee : public CreatureScript
public:
boss_dorothee() : CreatureScript("boss_dorothee") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_dorotheeAI(pCreature);
return new boss_dorotheeAI(creature);
}
struct boss_dorotheeAI : public ScriptedAI
@@ -222,9 +222,9 @@ class mob_tito : public CreatureScript
public:
mob_tito() : CreatureScript("mob_tito") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_titoAI(pCreature);
return new mob_titoAI(creature);
}
struct mob_titoAI : public ScriptedAI
@@ -289,9 +289,9 @@ class boss_strawman : public CreatureScript
public:
boss_strawman() : CreatureScript("boss_strawman") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_strawmanAI(pCreature);
return new boss_strawmanAI(creature);
}
struct boss_strawmanAI : public ScriptedAI
@@ -404,9 +404,9 @@ class boss_tinhead : public CreatureScript
public:
boss_tinhead() : CreatureScript("boss_tinhead") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_tinheadAI(pCreature);
return new boss_tinheadAI(creature);
}
struct boss_tinheadAI : public ScriptedAI
@@ -514,9 +514,9 @@ class boss_roar : public CreatureScript
public:
boss_roar() : CreatureScript("boss_roar") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_roarAI(pCreature);
return new boss_roarAI(creature);
}
struct boss_roarAI : public ScriptedAI
@@ -623,9 +623,9 @@ class boss_crone : public CreatureScript
public:
boss_crone() : CreatureScript("boss_crone") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_croneAI(pCreature);
return new boss_croneAI(creature);
}
struct boss_croneAI : public ScriptedAI
@@ -705,9 +705,9 @@ class mob_cyclone : public CreatureScript
public:
mob_cyclone() : CreatureScript("mob_cyclone") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_cycloneAI(pCreature);
return new mob_cycloneAI(creature);
}
struct mob_cycloneAI : public ScriptedAI
@@ -769,24 +769,24 @@ class npc_grandmother : public CreatureScript
public:
npc_grandmother() : CreatureScript("npc_grandmother") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF)
{
if (Creature* pBigBadWolf = pCreature->SummonCreature(CREATURE_BIG_BAD_WOLF, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS))
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(pPlayer);
pCreature->DespawnOrUnsummon();
creature->DespawnOrUnsummon();
}
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_GRANDMA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
pPlayer->SEND_GOSSIP_MENU(8990, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(8990, creature->GetGUID());
return true;
}
@@ -798,9 +798,9 @@ class boss_bigbadwolf : public CreatureScript
public:
boss_bigbadwolf() : CreatureScript("boss_bigbadwolf") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_bigbadwolfAI(pCreature);
return new boss_bigbadwolfAI(creature);
}
struct boss_bigbadwolfAI : public ScriptedAI
@@ -966,15 +966,15 @@ enum RAJPhase
PHASE_BOTH = 2,
};
void PretendToDie(Creature* pCreature)
void PretendToDie(Creature* creature)
{
pCreature->InterruptNonMeleeSpells(true);
pCreature->RemoveAllAuras();
pCreature->SetHealth(0);
pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
pCreature->GetMotionMaster()->MovementExpired(false);
pCreature->GetMotionMaster()->MoveIdle();
pCreature->SetStandState(UNIT_STAND_STATE_DEAD);
creature->InterruptNonMeleeSpells(true);
creature->RemoveAllAuras();
creature->SetHealth(0);
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
creature->GetMotionMaster()->MovementExpired(false);
creature->GetMotionMaster()->MoveIdle();
creature->SetStandState(UNIT_STAND_STATE_DEAD);
};
void Resurrect(Creature* pTarget)
@@ -997,9 +997,9 @@ class boss_julianne : public CreatureScript
public:
boss_julianne() : CreatureScript("boss_julianne") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_julianneAI(pCreature);
return new boss_julianneAI(creature);
}
struct boss_julianneAI : public ScriptedAI
@@ -1120,9 +1120,9 @@ class boss_romulo : public CreatureScript
public:
boss_romulo() : CreatureScript("boss_romulo") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_romuloAI(pCreature);
return new boss_romuloAI(creature);
}
struct boss_romuloAI : public ScriptedAI

View File

@@ -252,11 +252,11 @@ public:
uint32 entry = ((uint32)Spawns[index][0]);
float PosX = Spawns[index][1];
if (Creature* pCreature = me->SummonCreature(entry, PosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS))
if (Creature* creature = me->SummonCreature(entry, PosX, SPAWN_Y, SPAWN_Z, SPAWN_O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, HOUR*2*IN_MILLISECONDS))
{
// In case database has bad flags
pCreature->SetUInt32Value(UNIT_FIELD_FLAGS, 0);
pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
creature->SetUInt32Value(UNIT_FIELD_FLAGS, 0);
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
}
@@ -324,16 +324,16 @@ public:
}
};
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
npc_barnesAI* pBarnesAI = CAST_AI(npc_barnes::npc_barnesAI, pCreature->AI());
npc_barnesAI* pBarnesAI = CAST_AI(npc_barnes::npc_barnesAI, creature->AI());
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, OZ_GOSSIP2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
pPlayer->SEND_GOSSIP_MENU(8971, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(8971, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->CLOSE_GOSSIP_MENU();
@@ -359,9 +359,9 @@ public:
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
if (InstanceScript* pInstance = pCreature->GetInstanceScript())
if (InstanceScript* pInstance = creature->GetInstanceScript())
{
// Check for death of Moroes and if opera event is not done already
if (pInstance->GetData(TYPE_MOROES) == DONE && pInstance->GetData(TYPE_OPERA) != DONE)
@@ -375,25 +375,25 @@ public:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_DOT, OZ_GM_GOSSIP3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
}
if (npc_barnesAI* pBarnesAI = CAST_AI(npc_barnes::npc_barnesAI, pCreature->AI()))
if (npc_barnesAI* pBarnesAI = CAST_AI(npc_barnes::npc_barnesAI, creature->AI()))
{
if (!pBarnesAI->RaidWiped)
pPlayer->SEND_GOSSIP_MENU(8970, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(8970, creature->GetGUID());
else
pPlayer->SEND_GOSSIP_MENU(8975, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(8975, creature->GetGUID());
return true;
}
}
}
pPlayer->SEND_GOSSIP_MENU(8978, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(8978, creature->GetGUID());
return true;
}
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_barnesAI(pCreature);
return new npc_barnesAI(creature);
}
};
@@ -414,7 +414,7 @@ class npc_berthold : public CreatureScript
public:
npc_berthold() : CreatureScript("npc_berthold") { }
bool OnGossipSelect(Player* pPlayer, Creature* /*pCreature*/, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* /*creature*/, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
@@ -424,16 +424,16 @@ public:
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
if (InstanceScript* pInstance = pCreature->GetInstanceScript())
if (InstanceScript* pInstance = creature->GetInstanceScript())
{
// Check if Shade of Aran event is done
if (pInstance->GetData(TYPE_ARAN) == DONE)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TELEPORT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
}
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(creature), creature->GetGUID());
return true;
}
@@ -467,9 +467,9 @@ class npc_image_of_medivh : public CreatureScript
public:
npc_image_of_medivh() : CreatureScript("npc_image_of_medivh") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_image_of_medivhAI(pCreature);
return new npc_image_of_medivhAI(creature);
}
struct npc_image_of_medivhAI : public ScriptedAI

View File

@@ -92,9 +92,9 @@ class boss_priestess_delrissa : public CreatureScript
public:
boss_priestess_delrissa() : CreatureScript("boss_priestess_delrissa") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_priestess_delrissaAI(pCreature);
return new boss_priestess_delrissaAI(creature);
}
struct boss_priestess_delrissaAI : public ScriptedAI
@@ -486,9 +486,9 @@ class boss_kagani_nightstrike : public CreatureScript
public:
boss_kagani_nightstrike() : CreatureScript("boss_kagani_nightstrike") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_kagani_nightstrikeAI(pCreature);
return new boss_kagani_nightstrikeAI(creature);
}
struct boss_kagani_nightstrikeAI : public boss_priestess_lackey_commonAI
@@ -591,9 +591,9 @@ class boss_ellris_duskhallow : public CreatureScript
public:
boss_ellris_duskhallow() : CreatureScript("boss_ellris_duskhallow") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_ellris_duskhallowAI(pCreature);
return new boss_ellris_duskhallowAI(creature);
}
struct boss_ellris_duskhallowAI : public boss_priestess_lackey_commonAI
@@ -683,9 +683,9 @@ class boss_eramas_brightblaze : public CreatureScript
public:
boss_eramas_brightblaze() : CreatureScript("boss_eramas_brightblaze") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_eramas_brightblazeAI(pCreature);
return new boss_eramas_brightblazeAI(creature);
}
struct boss_eramas_brightblazeAI : public boss_priestess_lackey_commonAI
@@ -745,9 +745,9 @@ class boss_yazzai : public CreatureScript
public:
boss_yazzai() : CreatureScript("boss_yazzai") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_yazzaiAI(pCreature);
return new boss_yazzaiAI(creature);
}
struct boss_yazzaiAI : public boss_priestess_lackey_commonAI
@@ -876,9 +876,9 @@ class boss_warlord_salaris : public CreatureScript
public:
boss_warlord_salaris() : CreatureScript("boss_warlord_salaris") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_warlord_salarisAI(pCreature);
return new boss_warlord_salarisAI(creature);
}
struct boss_warlord_salarisAI : public boss_priestess_lackey_commonAI
@@ -997,9 +997,9 @@ class boss_garaxxas : public CreatureScript
public:
boss_garaxxas() : CreatureScript("boss_garaxxas") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_garaxxasAI(pCreature);
return new boss_garaxxasAI(creature);
}
struct boss_garaxxasAI : public boss_priestess_lackey_commonAI
@@ -1117,9 +1117,9 @@ class boss_apoko : public CreatureScript
public:
boss_apoko() : CreatureScript("boss_apoko") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_apokoAI(pCreature);
return new boss_apokoAI(creature);
}
struct boss_apokoAI : public boss_priestess_lackey_commonAI
@@ -1216,9 +1216,9 @@ class boss_zelfan : public CreatureScript
public:
boss_zelfan() : CreatureScript("boss_zelfan") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_zelfanAI(pCreature);
return new boss_zelfanAI(creature);
}
struct boss_zelfanAI : public boss_priestess_lackey_commonAI
@@ -1302,9 +1302,9 @@ class mob_high_explosive_sheep : public CreatureScript
public:
mob_high_explosive_sheep() : CreatureScript("mob_high_explosive_sheep") { }
//CreatureAI* GetAI(Creature* pCreature) const
//CreatureAI* GetAI(Creature* creature) const
//{
// return new mob_high_explosive_sheepAI (pCreature);
// return new mob_high_explosive_sheepAI (creature);
//};
};
*/

View File

@@ -56,9 +56,9 @@ class boss_selin_fireheart : public CreatureScript
public:
boss_selin_fireheart() : CreatureScript("boss_selin_fireheart") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_selin_fireheartAI (pCreature);
return new boss_selin_fireheartAI (creature);
};
struct boss_selin_fireheartAI : public ScriptedAI
@@ -326,9 +326,9 @@ class mob_fel_crystal : public CreatureScript
public:
mob_fel_crystal() : CreatureScript("mob_fel_crystal") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_fel_crystalAI (pCreature);
return new mob_fel_crystalAI (creature);
};
struct mob_fel_crystalAI : public ScriptedAI

View File

@@ -64,9 +64,9 @@ class boss_vexallus : public CreatureScript
public:
boss_vexallus() : CreatureScript("boss_vexallus") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_vexallusAI (pCreature);
return new boss_vexallusAI (creature);
};
struct boss_vexallusAI : public ScriptedAI
@@ -199,9 +199,9 @@ class mob_pure_energy : public CreatureScript
public:
mob_pure_energy() : CreatureScript("mob_pure_energy") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_pure_energyAI (pCreature);
return new mob_pure_energyAI (creature);
};
struct mob_pure_energyAI : public ScriptedAI

View File

@@ -56,54 +56,54 @@ class npc_kalecgos : public CreatureScript
public:
npc_kalecgos() : CreatureScript("npc_kalecgos") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
switch(uiAction)
{
case GOSSIP_ACTION_INFO_DEF:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
pPlayer->SEND_GOSSIP_MENU(12500, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(12500, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
pPlayer->SEND_GOSSIP_MENU(12502, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(12502, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
pPlayer->SEND_GOSSIP_MENU(12606, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(12606, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
pPlayer->SEND_GOSSIP_MENU(12607, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(12607, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
pPlayer->SEND_GOSSIP_MENU(12608, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(12608, creature->GetGUID());
break;
}
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
if (creature->isQuestGiver())
pPlayer->PrepareQuestMenu(creature->GetGUID());
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_KAEL_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
pPlayer->SEND_GOSSIP_MENU(12498, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(12498, creature->GetGUID());
return true;
}
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_kalecgosAI(pCreature);
return new npc_kalecgosAI(creature);
}
struct npc_kalecgosAI : public ScriptedAI
{
npc_kalecgosAI(Creature* pCreature) : ScriptedAI(pCreature) {}
npc_kalecgosAI(Creature* creature) : ScriptedAI(creature) {}
uint32 m_uiTransformTimer;

View File

@@ -52,7 +52,7 @@ class boss_baron_geddon : public CreatureScript
struct boss_baron_geddonAI : public BossAI
{
boss_baron_geddonAI(Creature* pCreature) : BossAI(pCreature, BOSS_BARON_GEDDON)
boss_baron_geddonAI(Creature* creature) : BossAI(creature, BOSS_BARON_GEDDON)
{
}
@@ -110,9 +110,9 @@ class boss_baron_geddon : public CreatureScript
}
};
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_baron_geddonAI (pCreature);
return new boss_baron_geddonAI (creature);
}
};

View File

@@ -55,7 +55,7 @@ class boss_magmadar : public CreatureScript
struct boss_magmadarAI : public BossAI
{
boss_magmadarAI(Creature* pCreature) : BossAI(pCreature, BOSS_MAGMADAR)
boss_magmadarAI(Creature* creature) : BossAI(creature, BOSS_MAGMADAR)
{
}

View File

@@ -76,7 +76,7 @@ class boss_majordomo : public CreatureScript
struct boss_majordomoAI : public BossAI
{
boss_majordomoAI(Creature* pCreature) : BossAI(pCreature, BOSS_MAJORDOMO_EXECUTUS)
boss_majordomoAI(Creature* creature) : BossAI(creature, BOSS_MAJORDOMO_EXECUTUS)
{
}

View File

@@ -79,7 +79,7 @@ class boss_ragnaros : public CreatureScript
struct boss_ragnarosAI : public BossAI
{
boss_ragnarosAI(Creature* pCreature) : BossAI(pCreature, BOSS_RAGNAROS)
boss_ragnarosAI(Creature* creature) : BossAI(creature, BOSS_RAGNAROS)
{
_introState = 0;
me->SetReactState(REACT_PASSIVE);
@@ -303,9 +303,9 @@ class boss_ragnaros : public CreatureScript
bool _isBanished;
};
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_ragnarosAI(pCreature);
return new boss_ragnarosAI(creature);
}
};
@@ -339,9 +339,9 @@ class mob_son_of_flame : public CreatureScript
InstanceScript* instance;
};
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_son_of_flameAI(pCreature);
return new mob_son_of_flameAI(creature);
}
};

View File

@@ -46,9 +46,9 @@ class mob_ancient_core_hound : public CreatureScript
public:
mob_ancient_core_hound() : CreatureScript("mob_ancient_core_hound") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
SimpleAI *ai = new SimpleAI(pCreature);
SimpleAI *ai = new SimpleAI(creature);
ai->Spell[0].Enabled = true;
ai->Spell[0].Spell_Id = SPELL_CONE_OF_FIRE;

View File

@@ -95,9 +95,9 @@ class npc_unworthy_initiate : public CreatureScript
public:
npc_unworthy_initiate() : CreatureScript("npc_unworthy_initiate") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_unworthy_initiateAI(pCreature);
return new npc_unworthy_initiateAI(creature);
}
struct npc_unworthy_initiateAI : public ScriptedAI
@@ -286,9 +286,9 @@ class npc_unworthy_initiate_anchor : public CreatureScript
public:
npc_unworthy_initiate_anchor() : CreatureScript("npc_unworthy_initiate_anchor") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_unworthy_initiate_anchorAI(pCreature);
return new npc_unworthy_initiate_anchorAI(creature);
}
struct npc_unworthy_initiate_anchorAI : public PassiveAI
@@ -362,58 +362,58 @@ class npc_death_knight_initiate : public CreatureScript
public:
npc_death_knight_initiate() : CreatureScript("npc_death_knight_initiate") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF)
{
pPlayer->CLOSE_GOSSIP_MENU();
if (pPlayer->isInCombat() || pCreature->isInCombat())
if (pPlayer->isInCombat() || creature->isInCombat())
return true;
if (npc_death_knight_initiateAI* pInitiateAI = CAST_AI(npc_death_knight_initiate::npc_death_knight_initiateAI, pCreature->AI()))
if (npc_death_knight_initiateAI* pInitiateAI = CAST_AI(npc_death_knight_initiate::npc_death_knight_initiateAI, creature->AI()))
{
if (pInitiateAI->m_bIsDuelInProgress)
return true;
}
pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNK_15);
int32 uiSayId = rand()% (sizeof(m_auiRandomSay)/sizeof(int32));
DoScriptText(m_auiRandomSay[uiSayId], pCreature, pPlayer);
DoScriptText(m_auiRandomSay[uiSayId], creature, pPlayer);
pPlayer->CastSpell(pCreature, SPELL_DUEL, false);
pPlayer->CastSpell(creature, SPELL_DUEL, false);
pPlayer->CastSpell(pPlayer, SPELL_DUEL_FLAG, true);
}
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
if (pPlayer->GetQuestStatus(QUEST_DEATH_CHALLENGE) == QUEST_STATUS_INCOMPLETE && pCreature->IsFullHealth())
if (pPlayer->GetQuestStatus(QUEST_DEATH_CHALLENGE) == QUEST_STATUS_INCOMPLETE && creature->IsFullHealth())
{
if (pPlayer->HealthBelowPct(10))
return true;
if (pPlayer->isInCombat() || pCreature->isInCombat())
if (pPlayer->isInCombat() || creature->isInCombat())
return true;
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ACCEPT_DUEL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(creature), creature->GetGUID());
}
return true;
}
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_death_knight_initiateAI(pCreature);
return new npc_death_knight_initiateAI(creature);
}
struct npc_death_knight_initiateAI : public CombatAI
{
npc_death_knight_initiateAI(Creature* pCreature) : CombatAI(pCreature)
npc_death_knight_initiateAI(Creature* creature) : CombatAI(creature)
{
m_bIsDuelInProgress = false;
}
@@ -524,9 +524,9 @@ class npc_dark_rider_of_acherus : public CreatureScript
public:
npc_dark_rider_of_acherus() : CreatureScript("npc_dark_rider_of_acherus") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_dark_rider_of_acherusAI(pCreature);
return new npc_dark_rider_of_acherusAI(creature);
}
struct npc_dark_rider_of_acherusAI : public ScriptedAI
@@ -616,9 +616,9 @@ class npc_salanar_the_horseman : public CreatureScript
public:
npc_salanar_the_horseman() : CreatureScript("npc_salanar_the_horseman") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_salanar_the_horsemanAI(pCreature);
return new npc_salanar_the_horsemanAI(creature);
}
struct npc_salanar_the_horsemanAI : public ScriptedAI
@@ -685,9 +685,9 @@ class npc_ros_dark_rider : public CreatureScript
public:
npc_ros_dark_rider() : CreatureScript("npc_ros_dark_rider") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_ros_dark_riderAI(pCreature);
return new npc_ros_dark_riderAI(creature);
}
struct npc_ros_dark_riderAI : public ScriptedAI
@@ -736,9 +736,9 @@ class npc_dkc1_gothik : public CreatureScript
public:
npc_dkc1_gothik() : CreatureScript("npc_dkc1_gothik") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_dkc1_gothikAI(pCreature);
return new npc_dkc1_gothikAI(creature);
}
struct npc_dkc1_gothikAI : public ScriptedAI
@@ -778,9 +778,9 @@ class npc_scarlet_ghoul : public CreatureScript
public:
npc_scarlet_ghoul() : CreatureScript("npc_scarlet_ghoul") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_scarlet_ghoulAI(pCreature);
return new npc_scarlet_ghoulAI(creature);
}
struct npc_scarlet_ghoulAI : public ScriptedAI

View File

@@ -49,14 +49,14 @@ class npc_crusade_persuaded : public CreatureScript
public:
npc_crusade_persuaded() : CreatureScript("npc_crusade_persuaded") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_crusade_persuadedAI (pCreature);
return new npc_crusade_persuadedAI (creature);
}
struct npc_crusade_persuadedAI : public ScriptedAI
{
npc_crusade_persuadedAI(Creature* pCreature) : ScriptedAI(pCreature) {}
npc_crusade_persuadedAI(Creature* creature) : ScriptedAI(creature) {}
uint32 uiSpeech_timer;
uint32 uiSpeech_counter;
@@ -177,26 +177,26 @@ class npc_koltira_deathweaver : public CreatureScript
public:
npc_koltira_deathweaver() : CreatureScript("npc_koltira_deathweaver") { }
bool OnQuestAccept(Player* pPlayer, Creature* pCreature, const Quest* pQuest)
bool OnQuestAccept(Player* pPlayer, Creature* creature, const Quest* pQuest)
{
if (pQuest->GetQuestId() == QUEST_BREAKOUT)
{
pCreature->SetStandState(UNIT_STAND_STATE_STAND);
creature->SetStandState(UNIT_STAND_STATE_STAND);
if (npc_escortAI* pEscortAI = CAST_AI(npc_koltira_deathweaver::npc_koltira_deathweaverAI, pCreature->AI()))
if (npc_escortAI* pEscortAI = CAST_AI(npc_koltira_deathweaver::npc_koltira_deathweaverAI, creature->AI()))
pEscortAI->Start(false, false, pPlayer->GetGUID());
}
return true;
}
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_koltira_deathweaverAI(pCreature);
return new npc_koltira_deathweaverAI(creature);
}
struct npc_koltira_deathweaverAI : public npc_escortAI
{
npc_koltira_deathweaverAI(Creature* pCreature) : npc_escortAI(pCreature)
npc_koltira_deathweaverAI(Creature* creature) : npc_escortAI(creature)
{
me->SetReactState(REACT_DEFENSIVE);
}
@@ -356,14 +356,14 @@ class mob_scarlet_courier : public CreatureScript
public:
mob_scarlet_courier() : CreatureScript("mob_scarlet_courier") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_scarlet_courierAI (pCreature);
return new mob_scarlet_courierAI (creature);
}
struct mob_scarlet_courierAI : public ScriptedAI
{
mob_scarlet_courierAI(Creature* pCreature) : ScriptedAI(pCreature) {}
mob_scarlet_courierAI(Creature* creature) : ScriptedAI(creature) {}
uint32 uiStage;
uint32 uiStage_timer;
@@ -450,14 +450,14 @@ class mob_high_inquisitor_valroth : public CreatureScript
public:
mob_high_inquisitor_valroth() : CreatureScript("mob_high_inquisitor_valroth") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_high_inquisitor_valrothAI (pCreature);
return new mob_high_inquisitor_valrothAI (creature);
}
struct mob_high_inquisitor_valrothAI : public ScriptedAI
{
mob_high_inquisitor_valrothAI(Creature* pCreature) : ScriptedAI(pCreature) {}
mob_high_inquisitor_valrothAI(Creature* creature) : ScriptedAI(creature) {}
uint32 uiRenew_timer;
uint32 uiInquisitor_Penance_timer;
@@ -586,14 +586,14 @@ class npc_a_special_surprise : public CreatureScript
public:
npc_a_special_surprise() : CreatureScript("npc_a_special_surprise") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_a_special_surpriseAI(pCreature);
return new npc_a_special_surpriseAI(creature);
}
struct npc_a_special_surpriseAI : public ScriptedAI
{
npc_a_special_surpriseAI(Creature* pCreature) : ScriptedAI(pCreature) {}
npc_a_special_surpriseAI(Creature* creature) : ScriptedAI(creature) {}
uint32 ExecuteSpeech_Timer;
uint32 ExecuteSpeech_Counter;

View File

@@ -287,41 +287,41 @@ class npc_highlord_darion_mograine : public CreatureScript
public:
npc_highlord_darion_mograine() : CreatureScript("npc_highlord_darion_mograine") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->CLOSE_GOSSIP_MENU();
CAST_AI(npc_highlord_darion_mograine::npc_highlord_darion_mograineAI, pCreature->AI())->uiStep = 1;
CAST_AI(npc_highlord_darion_mograine::npc_highlord_darion_mograineAI, pCreature->AI())->Start(true, false, pPlayer->GetGUID());
CAST_AI(npc_highlord_darion_mograine::npc_highlord_darion_mograineAI, creature->AI())->uiStep = 1;
CAST_AI(npc_highlord_darion_mograine::npc_highlord_darion_mograineAI, creature->AI())->Start(true, false, pPlayer->GetGUID());
break;
}
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
if (creature->isQuestGiver())
pPlayer->PrepareQuestMenu(creature->GetGUID());
if (pPlayer->GetQuestStatus(12801) == QUEST_STATUS_INCOMPLETE)
pPlayer->ADD_GOSSIP_ITEM(0, "I am ready.", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(creature), creature->GetGUID());
return true;
}
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_highlord_darion_mograineAI(pCreature);
return new npc_highlord_darion_mograineAI(creature);
}
struct npc_highlord_darion_mograineAI : public npc_escortAI
{
npc_highlord_darion_mograineAI(Creature* pCreature) : npc_escortAI(pCreature)
npc_highlord_darion_mograineAI(Creature* creature) : npc_escortAI(creature)
{
Reset();
}
@@ -1671,14 +1671,14 @@ class npc_the_lich_king_tirion_dawn : public CreatureScript
public:
npc_the_lich_king_tirion_dawn() : CreatureScript("npc_the_lich_king_tirion_dawn") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_the_lich_king_tirion_dawnAI (pCreature);
return new npc_the_lich_king_tirion_dawnAI (creature);
}
struct npc_the_lich_king_tirion_dawnAI : public ScriptedAI
{
npc_the_lich_king_tirion_dawnAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); }
npc_the_lich_king_tirion_dawnAI(Creature* creature) : ScriptedAI(creature) { Reset(); }
void Reset() {}
void AttackStart(Unit* /*who*/) {} // very sample, just don't make them aggreesive
void UpdateAI(const uint32 /*diff*/) {}

View File

@@ -28,9 +28,9 @@ class npc_valkyr_battle_maiden : public CreatureScript
public:
npc_valkyr_battle_maiden() : CreatureScript("npc_valkyr_battle_maiden") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_valkyr_battle_maidenAI (pCreature);
return new npc_valkyr_battle_maidenAI (creature);
}
struct npc_valkyr_battle_maidenAI : public PassiveAI

View File

@@ -42,9 +42,9 @@ class boss_arcanist_doan : public CreatureScript
public:
boss_arcanist_doan() : CreatureScript("boss_arcanist_doan") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_arcanist_doanAI (pCreature);
return new boss_arcanist_doanAI (creature);
}
struct boss_arcanist_doanAI : public ScriptedAI

View File

@@ -34,9 +34,9 @@ class boss_azshir_the_sleepless : public CreatureScript
public:
boss_azshir_the_sleepless() : CreatureScript("boss_azshir_the_sleepless") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_azshir_the_sleeplessAI (pCreature);
return new boss_azshir_the_sleeplessAI (creature);
}
struct boss_azshir_the_sleeplessAI : public ScriptedAI

View File

@@ -42,9 +42,9 @@ class boss_bloodmage_thalnos : public CreatureScript
public:
boss_bloodmage_thalnos() : CreatureScript("boss_bloodmage_thalnos") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_bloodmage_thalnosAI (pCreature);
return new boss_bloodmage_thalnosAI (creature);
}
struct boss_bloodmage_thalnosAI : public ScriptedAI

View File

@@ -133,9 +133,9 @@ class mob_wisp_invis : public CreatureScript
public:
mob_wisp_invis() : CreatureScript("mob_wisp_invis") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_wisp_invisAI (pCreature);
return new mob_wisp_invisAI (creature);
}
struct mob_wisp_invisAI : public ScriptedAI
@@ -220,9 +220,9 @@ class mob_head : public CreatureScript
public:
mob_head() : CreatureScript("mob_head") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_headAI (pCreature);
return new mob_headAI (creature);
}
struct mob_headAI : public ScriptedAI
@@ -359,9 +359,9 @@ class boss_headless_horseman : public CreatureScript
public:
boss_headless_horseman() : CreatureScript("boss_headless_horseman") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_headless_horsemanAI (pCreature);
return new boss_headless_horsemanAI (creature);
}
struct boss_headless_horsemanAI : public ScriptedAI
@@ -748,9 +748,9 @@ class mob_pulsing_pumpkin : public CreatureScript
public:
mob_pulsing_pumpkin() : CreatureScript("mob_pulsing_pumpkin") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_pulsing_pumpkinAI (pCreature);
return new mob_pulsing_pumpkinAI (creature);
}
struct mob_pulsing_pumpkinAI : public ScriptedAI

View File

@@ -45,9 +45,9 @@ class boss_herod : public CreatureScript
public:
boss_herod() : CreatureScript("boss_herod") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_herodAI(pCreature);
return new boss_herodAI(creature);
}
struct boss_herodAI : public ScriptedAI
@@ -123,9 +123,9 @@ class mob_scarlet_trainee : public CreatureScript
public:
mob_scarlet_trainee() : CreatureScript("mob_scarlet_trainee") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_scarlet_traineeAI(pCreature);
return new mob_scarlet_traineeAI(creature);
}
struct mob_scarlet_traineeAI : public npc_escortAI

View File

@@ -40,9 +40,9 @@ class boss_high_inquisitor_fairbanks : public CreatureScript
public:
boss_high_inquisitor_fairbanks() : CreatureScript("boss_high_inquisitor_fairbanks") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_high_inquisitor_fairbanksAI (pCreature);
return new boss_high_inquisitor_fairbanksAI (creature);
}
struct boss_high_inquisitor_fairbanksAI : public ScriptedAI

View File

@@ -37,9 +37,9 @@ class boss_houndmaster_loksey : public CreatureScript
public:
boss_houndmaster_loksey() : CreatureScript("boss_houndmaster_loksey") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_houndmaster_lokseyAI (pCreature);
return new boss_houndmaster_lokseyAI (creature);
}
struct boss_houndmaster_lokseyAI : public ScriptedAI

View File

@@ -42,9 +42,9 @@ class boss_interrogator_vishas : public CreatureScript
public:
boss_interrogator_vishas() : CreatureScript("boss_interrogator_vishas") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_interrogator_vishasAI (pCreature);
return new boss_interrogator_vishasAI (creature);
}
struct boss_interrogator_vishasAI : public ScriptedAI

View File

@@ -58,16 +58,16 @@ class boss_scarlet_commander_mograine : public CreatureScript
public:
boss_scarlet_commander_mograine() : CreatureScript("boss_scarlet_commander_mograine") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_scarlet_commander_mograineAI (pCreature);
return new boss_scarlet_commander_mograineAI (creature);
}
struct boss_scarlet_commander_mograineAI : public ScriptedAI
{
boss_scarlet_commander_mograineAI(Creature* pCreature) : ScriptedAI(pCreature)
boss_scarlet_commander_mograineAI(Creature* creature) : ScriptedAI(creature)
{
m_pInstance = pCreature->GetInstanceScript();
m_pInstance = creature->GetInstanceScript();
}
InstanceScript* m_pInstance;
@@ -223,16 +223,16 @@ class boss_high_inquisitor_whitemane : public CreatureScript
public:
boss_high_inquisitor_whitemane() : CreatureScript("boss_high_inquisitor_whitemane") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_high_inquisitor_whitemaneAI (pCreature);
return new boss_high_inquisitor_whitemaneAI (creature);
}
struct boss_high_inquisitor_whitemaneAI : public ScriptedAI
{
boss_high_inquisitor_whitemaneAI(Creature* pCreature) : ScriptedAI(pCreature)
boss_high_inquisitor_whitemaneAI(Creature* creature) : ScriptedAI(creature)
{
m_pInstance = pCreature->GetInstanceScript();
m_pInstance = creature->GetInstanceScript();
}
InstanceScript* m_pInstance;

View File

@@ -35,9 +35,9 @@ class boss_scorn : public CreatureScript
public:
boss_scorn() : CreatureScript("boss_scorn") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_scornAI (pCreature);
return new boss_scornAI (creature);
}
struct boss_scornAI : public ScriptedAI

View File

@@ -55,9 +55,9 @@ class boss_darkmaster_gandling : public CreatureScript
public:
boss_darkmaster_gandling() : CreatureScript("boss_darkmaster_gandling") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_darkmaster_gandlingAI (pCreature);
return new boss_darkmaster_gandlingAI (creature);
}
struct boss_darkmaster_gandlingAI : public ScriptedAI

View File

@@ -30,9 +30,9 @@ class boss_death_knight_darkreaver : public CreatureScript
public:
boss_death_knight_darkreaver() : CreatureScript("boss_death_knight_darkreaver") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_death_knight_darkreaverAI (pCreature);
return new boss_death_knight_darkreaverAI (creature);
}
struct boss_death_knight_darkreaverAI : public ScriptedAI

View File

@@ -38,9 +38,9 @@ class boss_doctor_theolen_krastinov : public CreatureScript
public:
boss_doctor_theolen_krastinov() : CreatureScript("boss_doctor_theolen_krastinov") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_theolenkrastinovAI (pCreature);
return new boss_theolenkrastinovAI (creature);
}
struct boss_theolenkrastinovAI : public ScriptedAI

View File

@@ -36,9 +36,9 @@ class boss_illucia_barov : public CreatureScript
public:
boss_illucia_barov() : CreatureScript("boss_illucia_barov") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_illuciabarovAI (pCreature);
return new boss_illuciabarovAI (creature);
}
struct boss_illuciabarovAI : public ScriptedAI

View File

@@ -37,9 +37,9 @@ class boss_instructor_malicia : public CreatureScript
public:
boss_instructor_malicia() : CreatureScript("boss_instructor_malicia") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_instructormaliciaAI (pCreature);
return new boss_instructormaliciaAI (creature);
}
struct boss_instructormaliciaAI : public ScriptedAI

View File

@@ -36,9 +36,9 @@ class boss_jandice_barov : public CreatureScript
public:
boss_jandice_barov() : CreatureScript("boss_jandice_barov") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_jandicebarovAI (pCreature);
return new boss_jandicebarovAI (creature);
}
struct boss_jandicebarovAI : public ScriptedAI
@@ -158,9 +158,9 @@ class mob_illusionofjandicebarov : public CreatureScript
public:
mob_illusionofjandicebarov() : CreatureScript("mob_illusionofjandicebarov") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_illusionofjandicebarovAI (pCreature);
return new mob_illusionofjandicebarovAI (creature);
}
struct mob_illusionofjandicebarovAI : public ScriptedAI

View File

@@ -33,9 +33,9 @@ class boss_kormok : public CreatureScript
public:
boss_kormok() : CreatureScript("boss_kormok") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_kormokAI (pCreature);
return new boss_kormokAI (creature);
}
struct boss_kormokAI : public ScriptedAI

View File

@@ -34,9 +34,9 @@ class boss_lord_alexei_barov : public CreatureScript
public:
boss_lord_alexei_barov() : CreatureScript("boss_lord_alexei_barov") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_lordalexeibarovAI (pCreature);
return new boss_lordalexeibarovAI (creature);
}
struct boss_lordalexeibarovAI : public ScriptedAI

View File

@@ -36,9 +36,9 @@ class boss_lorekeeper_polkelt : public CreatureScript
public:
boss_lorekeeper_polkelt() : CreatureScript("boss_lorekeeper_polkelt") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_lorekeeperpolkeltAI (pCreature);
return new boss_lorekeeperpolkeltAI (creature);
}
struct boss_lorekeeperpolkeltAI : public ScriptedAI

View File

@@ -37,9 +37,9 @@ class boss_boss_ras_frostwhisper : public CreatureScript
public:
boss_boss_ras_frostwhisper() : CreatureScript("boss_boss_ras_frostwhisper") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_rasfrostAI (pCreature);
return new boss_rasfrostAI (creature);
}
struct boss_rasfrostAI : public ScriptedAI

View File

@@ -36,9 +36,9 @@ class boss_the_ravenian : public CreatureScript
public:
boss_the_ravenian() : CreatureScript("boss_the_ravenian") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_theravenianAI (pCreature);
return new boss_theravenianAI (creature);
}
struct boss_theravenianAI : public ScriptedAI

View File

@@ -38,9 +38,9 @@ class boss_vectus : public CreatureScript
public:
boss_vectus() : CreatureScript("boss_vectus") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_vectusAI (pCreature);
return new boss_vectusAI (creature);
}
struct boss_vectusAI : public ScriptedAI

View File

@@ -58,32 +58,32 @@ class npc_shadowfang_prisoner : public CreatureScript
public:
npc_shadowfang_prisoner() : CreatureScript("npc_shadowfang_prisoner") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_shadowfang_prisonerAI(pCreature);
return new npc_shadowfang_prisonerAI(creature);
}
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
{
pPlayer->CLOSE_GOSSIP_MENU();
if (npc_escortAI* pEscortAI = CAST_AI(npc_shadowfang_prisoner::npc_shadowfang_prisonerAI, pCreature->AI()))
if (npc_escortAI* pEscortAI = CAST_AI(npc_shadowfang_prisoner::npc_shadowfang_prisonerAI, creature->AI()))
pEscortAI->Start(false, false);
}
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
InstanceScript* pInstance = pCreature->GetInstanceScript();
InstanceScript* pInstance = creature->GetInstanceScript();
if (pInstance && pInstance->GetData(TYPE_FREE_NPC) != DONE && pInstance->GetData(TYPE_RETHILGORE) == DONE)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_DOOR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(creature), creature->GetGUID());
return true;
}
@@ -146,16 +146,16 @@ class npc_arugal_voidwalker : public CreatureScript
public:
npc_arugal_voidwalker() : CreatureScript("npc_arugal_voidwalker") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_arugal_voidwalkerAI(pCreature);
return new npc_arugal_voidwalkerAI(creature);
}
struct npc_arugal_voidwalkerAI : public ScriptedAI
{
npc_arugal_voidwalkerAI(Creature* pCreature) : ScriptedAI(pCreature)
npc_arugal_voidwalkerAI(Creature* creature) : ScriptedAI(creature)
{
pInstance = pCreature->GetInstanceScript();
pInstance = creature->GetInstanceScript();
}
InstanceScript* pInstance;

View File

@@ -82,9 +82,9 @@ class boss_baron_rivendare : public CreatureScript
public:
boss_baron_rivendare() : CreatureScript("boss_baron_rivendare") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_baron_rivendareAI (pCreature);
return new boss_baron_rivendareAI (creature);
}
struct boss_baron_rivendareAI : public ScriptedAI

View File

@@ -36,9 +36,9 @@ class boss_baroness_anastari : public CreatureScript
public:
boss_baroness_anastari() : CreatureScript("boss_baroness_anastari") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_baroness_anastariAI (pCreature);
return new boss_baroness_anastariAI (creature);
}
struct boss_baroness_anastariAI : public ScriptedAI

View File

@@ -81,9 +81,9 @@ class boss_cannon_master_willey : public CreatureScript
public:
boss_cannon_master_willey() : CreatureScript("boss_cannon_master_willey") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_cannon_master_willeyAI (pCreature);
return new boss_cannon_master_willeyAI (creature);
}
struct boss_cannon_master_willeyAI : public ScriptedAI

View File

@@ -70,9 +70,9 @@ class boss_dathrohan_balnazzar : public CreatureScript
public:
boss_dathrohan_balnazzar() : CreatureScript("boss_dathrohan_balnazzar") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_dathrohan_balnazzarAI (pCreature);
return new boss_dathrohan_balnazzarAI (creature);
}
struct boss_dathrohan_balnazzarAI : public ScriptedAI

View File

@@ -39,9 +39,9 @@ class boss_magistrate_barthilas : public CreatureScript
public:
boss_magistrate_barthilas() : CreatureScript("boss_magistrate_barthilas") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_magistrate_barthilasAI (pCreature);
return new boss_magistrate_barthilasAI (creature);
}
struct boss_magistrate_barthilasAI : public ScriptedAI

View File

@@ -36,9 +36,9 @@ class boss_maleki_the_pallid : public CreatureScript
public:
boss_maleki_the_pallid() : CreatureScript("boss_maleki_the_pallid") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_maleki_the_pallidAI (pCreature);
return new boss_maleki_the_pallidAI (creature);
}
struct boss_maleki_the_pallidAI : public ScriptedAI

View File

@@ -36,9 +36,9 @@ class boss_nerubenkan : public CreatureScript
public:
boss_nerubenkan() : CreatureScript("boss_nerubenkan") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_nerubenkanAI (pCreature);
return new boss_nerubenkanAI (creature);
}
struct boss_nerubenkanAI : public ScriptedAI

View File

@@ -47,9 +47,9 @@ class boss_silver_hand_bosses : public CreatureScript
public:
boss_silver_hand_bosses() : CreatureScript("boss_silver_hand_bosses") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_silver_hand_bossesAI (pCreature);
return new boss_silver_hand_bossesAI (creature);
}
struct boss_silver_hand_bossesAI : public ScriptedAI

View File

@@ -41,9 +41,9 @@ class boss_postmaster_malown : public CreatureScript
public:
boss_postmaster_malown() : CreatureScript("boss_postmaster_malown") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_postmaster_malownAI (pCreature);
return new boss_postmaster_malownAI (creature);
}
struct boss_postmaster_malownAI : public ScriptedAI

View File

@@ -36,9 +36,9 @@ class boss_ramstein_the_gorger : public CreatureScript
public:
boss_ramstein_the_gorger() : CreatureScript("boss_ramstein_the_gorger") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_ramstein_the_gorgerAI (pCreature);
return new boss_ramstein_the_gorgerAI (creature);
}
struct boss_ramstein_the_gorgerAI : public ScriptedAI

View File

@@ -34,9 +34,9 @@ class boss_timmy_the_cruel : public CreatureScript
public:
boss_timmy_the_cruel() : CreatureScript("boss_timmy_the_cruel") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_timmy_the_cruelAI (pCreature);
return new boss_timmy_the_cruelAI (creature);
}
struct boss_timmy_the_cruelAI : public ScriptedAI

View File

@@ -92,9 +92,9 @@ class mob_freed_soul : public CreatureScript
public:
mob_freed_soul() : CreatureScript("mob_freed_soul") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_freed_soulAI (pCreature);
return new mob_freed_soulAI (creature);
}
struct mob_freed_soulAI : public ScriptedAI
@@ -126,9 +126,9 @@ class mob_restless_soul : public CreatureScript
public:
mob_restless_soul() : CreatureScript("mob_restless_soul") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_restless_soulAI (pCreature);
return new mob_restless_soulAI (creature);
}
struct mob_restless_soulAI : public ScriptedAI
@@ -204,9 +204,9 @@ class mobs_spectral_ghostly_citizen : public CreatureScript
public:
mobs_spectral_ghostly_citizen() : CreatureScript("mobs_spectral_ghostly_citizen") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mobs_spectral_ghostly_citizenAI (pCreature);
return new mobs_spectral_ghostly_citizenAI (creature);
}
struct mobs_spectral_ghostly_citizenAI : public ScriptedAI

View File

@@ -71,9 +71,9 @@ class boss_brutallus : public CreatureScript
public:
boss_brutallus() : CreatureScript("boss_brutallus") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_brutallusAI (pCreature);
return new boss_brutallusAI (creature);
}
struct boss_brutallusAI : public ScriptedAI

View File

@@ -90,9 +90,9 @@ class boss_sacrolash : public CreatureScript
public:
boss_sacrolash() : CreatureScript("boss_sacrolash") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_sacrolashAI (pCreature);
return new boss_sacrolashAI (creature);
};
struct boss_sacrolashAI : public ScriptedAI
@@ -348,9 +348,9 @@ class boss_alythess : public CreatureScript
public:
boss_alythess() : CreatureScript("boss_alythess") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_alythessAI (pCreature);
return new boss_alythessAI (creature);
};
struct boss_alythessAI : public Scripted_NoMovementAI
@@ -678,9 +678,9 @@ class mob_shadow_image : public CreatureScript
public:
mob_shadow_image() : CreatureScript("mob_shadow_image") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_shadow_imageAI (pCreature);
return new mob_shadow_imageAI (creature);
};
struct mob_shadow_imageAI : public ScriptedAI

View File

@@ -108,9 +108,9 @@ class boss_felmyst : public CreatureScript
public:
boss_felmyst() : CreatureScript("boss_felmyst") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_felmystAI(pCreature);
return new boss_felmystAI(creature);
}
struct boss_felmystAI : public ScriptedAI
@@ -527,9 +527,9 @@ class mob_felmyst_vapor : public CreatureScript
public:
mob_felmyst_vapor() : CreatureScript("mob_felmyst_vapor") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_felmyst_vaporAI(pCreature);
return new mob_felmyst_vaporAI(creature);
}
struct mob_felmyst_vaporAI : public ScriptedAI
@@ -560,9 +560,9 @@ class mob_felmyst_trail : public CreatureScript
public:
mob_felmyst_trail() : CreatureScript("mob_felmyst_trail") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_felmyst_trailAI(pCreature);
return new mob_felmyst_trailAI(creature);
}
struct mob_felmyst_trailAI : public ScriptedAI

View File

@@ -108,9 +108,9 @@ class boss_kalecgos : public CreatureScript
public:
boss_kalecgos() : CreatureScript("boss_kalecgos") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_kalecgosAI (pCreature);
return new boss_kalecgosAI (creature);
}
struct boss_kalecgosAI : public ScriptedAI
@@ -441,9 +441,9 @@ class boss_kalec : public CreatureScript
public:
boss_kalec() : CreatureScript("boss_kalec") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_kalecAI (pCreature);
return new boss_kalecAI (creature);
}
struct boss_kalecAI : public ScriptedAI
@@ -571,9 +571,9 @@ class boss_sathrovarr : public CreatureScript
public:
boss_sathrovarr() : CreatureScript("boss_sathrovarr") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_sathrovarrAI (pCreature);
return new boss_sathrovarrAI (creature);
}
struct boss_sathrovarrAI : public ScriptedAI

View File

@@ -210,7 +210,7 @@ float ShieldOrbLocations[4][2]=
struct Speech
{
int32 textid;
uint32 pCreature, timer;
uint32 creature, timer;
};
// Timers
@@ -244,9 +244,9 @@ class boss_kalecgos_kj : public CreatureScript
public:
boss_kalecgos_kj() : CreatureScript("boss_kalecgos_kj") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_kalecgos_kjAI (pCreature);
return new boss_kalecgos_kjAI (creature);
}
struct boss_kalecgos_kjAI : public ScriptedAI
@@ -399,9 +399,9 @@ class mob_kiljaeden_controller : public CreatureScript
public:
mob_kiljaeden_controller() : CreatureScript("mob_kiljaeden_controller") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_kiljaeden_controllerAI (pCreature);
return new mob_kiljaeden_controllerAI (creature);
}
struct mob_kiljaeden_controllerAI : public Scripted_NoMovementAI
@@ -499,9 +499,9 @@ class boss_kiljaeden : public CreatureScript
public:
boss_kiljaeden() : CreatureScript("boss_kiljaeden") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_kiljaedenAI (pCreature);
return new boss_kiljaedenAI (creature);
}
struct boss_kiljaedenAI : public Scripted_NoMovementAI
@@ -723,7 +723,7 @@ public:
{
SpeechTimer = 0;
if (pInstance)
if (Creature* pSpeechCreature = Unit::GetCreature(*me, pInstance->GetData64(Speeches[speechCount].pCreature)))
if (Creature* pSpeechCreature = Unit::GetCreature(*me, pInstance->GetData64(Speeches[speechCount].creature)))
DoScriptText(Speeches[speechCount].textid, pSpeechCreature);
if (speechCount == 12)
if (Creature* pAnveena = Unit::GetCreature(*me, pInstance->GetData64(DATA_ANVEENA)))
@@ -913,9 +913,9 @@ class mob_hand_of_the_deceiver : public CreatureScript
public:
mob_hand_of_the_deceiver() : CreatureScript("mob_hand_of_the_deceiver") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_hand_of_the_deceiverAI (pCreature);
return new mob_hand_of_the_deceiverAI (creature);
}
struct mob_hand_of_the_deceiverAI : public ScriptedAI
@@ -1014,9 +1014,9 @@ class mob_felfire_portal : public CreatureScript
public:
mob_felfire_portal() : CreatureScript("mob_felfire_portal") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_felfire_portalAI (pCreature);
return new mob_felfire_portalAI (creature);
}
struct mob_felfire_portalAI : public Scripted_NoMovementAI
@@ -1059,9 +1059,9 @@ class mob_volatile_felfire_fiend : public CreatureScript
public:
mob_volatile_felfire_fiend() : CreatureScript("mob_volatile_felfire_fiend") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_volatile_felfire_fiendAI (pCreature);
return new mob_volatile_felfire_fiendAI (creature);
}
struct mob_volatile_felfire_fiendAI : public ScriptedAI
@@ -1117,9 +1117,9 @@ class mob_armageddon : public CreatureScript
public:
mob_armageddon() : CreatureScript("mob_armageddon") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_armageddonAI (pCreature);
return new mob_armageddonAI (creature);
}
struct mob_armageddonAI : public Scripted_NoMovementAI
@@ -1172,9 +1172,9 @@ class mob_shield_orb : public CreatureScript
public:
mob_shield_orb() : CreatureScript("mob_shield_orb") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_shield_orbAI (pCreature);
return new mob_shield_orbAI (creature);
}
struct mob_shield_orbAI : public ScriptedAI
@@ -1260,9 +1260,9 @@ class mob_sinster_reflection : public CreatureScript
public:
mob_sinster_reflection() : CreatureScript("mob_sinster_reflection") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new mob_sinster_reflectionAI (pCreature);
return new mob_sinster_reflectionAI (creature);
}
struct mob_sinster_reflectionAI : public ScriptedAI

View File

@@ -106,9 +106,9 @@ class boss_entropius : public CreatureScript
public:
boss_entropius() : CreatureScript("boss_entropius") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_entropiusAI (pCreature);
return new boss_entropiusAI (creature);
}
struct boss_entropiusAI : public ScriptedAI
@@ -206,9 +206,9 @@ class boss_muru : public CreatureScript
public:
boss_muru() : CreatureScript("boss_muru") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_muruAI (pCreature);
return new boss_muruAI (creature);
}
struct boss_muruAI : public Scripted_NoMovementAI
@@ -371,9 +371,9 @@ class npc_muru_portal : public CreatureScript
public:
npc_muru_portal() : CreatureScript("npc_muru_portal") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_muru_portalAI (pCreature);
return new npc_muru_portalAI (creature);
}
struct npc_muru_portalAI : public Scripted_NoMovementAI
@@ -455,9 +455,9 @@ class npc_dark_fiend : public CreatureScript
public:
npc_dark_fiend() : CreatureScript("npc_dark_fiend") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_dark_fiendAI (pCreature);
return new npc_dark_fiendAI (creature);
}
struct npc_dark_fiendAI : public ScriptedAI
@@ -518,9 +518,9 @@ class npc_void_sentinel : public CreatureScript
public:
npc_void_sentinel() : CreatureScript("npc_void_sentinel") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_void_sentinelAI (pCreature);
return new npc_void_sentinelAI (creature);
}
struct npc_void_sentinelAI : public ScriptedAI
@@ -574,9 +574,9 @@ class npc_blackhole : public CreatureScript
public:
npc_blackhole() : CreatureScript("npc_blackhole") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_blackholeAI (pCreature);
return new npc_blackholeAI (creature);
}
struct npc_blackholeAI : public ScriptedAI

View File

@@ -63,7 +63,7 @@ class boss_archaedas : public CreatureScript
struct boss_archaedasAI : public ScriptedAI
{
boss_archaedasAI(Creature* pCreature) : ScriptedAI(pCreature)
boss_archaedasAI(Creature* creature) : ScriptedAI(creature)
{
pInstance = me->GetInstanceScript();
}
@@ -331,7 +331,7 @@ class mob_stonekeepers : public CreatureScript
struct mob_stonekeepersAI : public ScriptedAI
{
mob_stonekeepersAI(Creature* pCreature) : ScriptedAI(pCreature)
mob_stonekeepersAI(Creature* creature) : ScriptedAI(creature)
{
pInstance = me->GetInstanceScript();
}

View File

@@ -42,7 +42,7 @@ class boss_ironaya : public CreatureScript
struct boss_ironayaAI : public ScriptedAI
{
boss_ironayaAI(Creature* pCreature) : ScriptedAI(pCreature) {}
boss_ironayaAI(Creature* creature) : ScriptedAI(creature) {}
uint32 uiArcingTimer;
bool bHasCastedWstomp;

View File

@@ -53,7 +53,7 @@ class mob_jadespine_basilisk : public CreatureScript
struct mob_jadespine_basiliskAI : public ScriptedAI
{
mob_jadespine_basiliskAI(Creature* pCreature) : ScriptedAI(pCreature) {}
mob_jadespine_basiliskAI(Creature* creature) : ScriptedAI(creature) {}
uint32 uiCslumberTimer;
@@ -173,80 +173,80 @@ class npc_lore_keeper_of_norgannon : public CreatureScript
{
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
if (pPlayer->GetQuestStatus(2278) == QUEST_STATUS_INCOMPLETE)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_KEEPER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
pPlayer->SEND_GOSSIP_MENU(1079, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1079, creature->GetGUID());
return true;
}
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2);
pPlayer->SEND_GOSSIP_MENU(1080, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1080, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3);
pPlayer->SEND_GOSSIP_MENU(1081, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1081, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+4);
pPlayer->SEND_GOSSIP_MENU(1082, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1082, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+5);
pPlayer->SEND_GOSSIP_MENU(1083, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1083, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+6);
pPlayer->SEND_GOSSIP_MENU(1084, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1084, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+6:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+7);
pPlayer->SEND_GOSSIP_MENU(1085, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1085, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+7:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+8);
pPlayer->SEND_GOSSIP_MENU(1086, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1086, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+8:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+9);
pPlayer->SEND_GOSSIP_MENU(1087, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1087, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+9:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+10);
pPlayer->SEND_GOSSIP_MENU(1088, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1088, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+10:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+11);
pPlayer->SEND_GOSSIP_MENU(1089, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1089, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+11:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER11, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+12);
pPlayer->SEND_GOSSIP_MENU(1090, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1090, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+12:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER12, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+13);
pPlayer->SEND_GOSSIP_MENU(1091, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1091, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+13:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER13, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+14);
pPlayer->SEND_GOSSIP_MENU(1092, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1092, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+14:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER14, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+15);
pPlayer->SEND_GOSSIP_MENU(1093, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1093, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+15:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_KEEPER15, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+16);
pPlayer->SEND_GOSSIP_MENU(1094, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1094, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+16:
pPlayer->CLOSE_GOSSIP_MENU();

View File

@@ -370,12 +370,12 @@ class boss_akilzon : public CreatureScript
if (z > 95)
z = 95.0f - urand(0, 5);
}
Creature* pCreature = me->SummonCreature(MOB_SOARING_EAGLE, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
if (pCreature)
Creature* creature = me->SummonCreature(MOB_SOARING_EAGLE, x, y, z, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
if (creature)
{
pCreature->AddThreat(me->getVictim(), 1.0f);
pCreature->AI()->AttackStart(me->getVictim());
BirdGUIDs[i] = pCreature->GetGUID();
creature->AddThreat(me->getVictim(), 1.0f);
creature->AI()->AttackStart(me->getVictim());
BirdGUIDs[i] = creature->GetGUID();
}
}
}

View File

@@ -325,18 +325,18 @@ class boss_hexlord_malacrass : public CreatureScript
{
for (uint8 i = 0; i < 4; ++i)
{
Creature* pCreature = (Unit::GetCreature((*me), AddGUID[i]));
if (!pCreature || !pCreature->isAlive())
Creature* creature = (Unit::GetCreature((*me), AddGUID[i]));
if (!creature || !creature->isAlive())
{
if (pCreature) pCreature->setDeathState(DEAD);
pCreature = me->SummonCreature(AddEntry[i], Pos_X[i], POS_Y, POS_Z, ORIENT, TEMPSUMMON_DEAD_DESPAWN, 0);
if (pCreature) AddGUID[i] = pCreature->GetGUID();
if (creature) creature->setDeathState(DEAD);
creature = me->SummonCreature(AddEntry[i], Pos_X[i], POS_Y, POS_Z, ORIENT, TEMPSUMMON_DEAD_DESPAWN, 0);
if (creature) AddGUID[i] = creature->GetGUID();
}
else
{
pCreature->AI()->EnterEvadeMode();
pCreature->GetMap()->CreatureRelocation(me, Pos_X[i], POS_Y, POS_Z, ORIENT);
pCreature->StopMoving();
creature->AI()->EnterEvadeMode();
creature->GetMap()->CreatureRelocation(me, Pos_X[i], POS_Y, POS_Z, ORIENT);
creature->StopMoving();
}
}
}

View File

@@ -296,16 +296,16 @@ class boss_zuljin : public CreatureScript
void SpawnAdds()
{
Creature* pCreature = NULL;
Creature* creature = NULL;
for (uint8 i = 0; i < 4; ++i)
{
pCreature = me->SummonCreature(SpiritInfo[i].entry, SpiritInfo[i].x, SpiritInfo[i].y, SpiritInfo[i].z, SpiritInfo[i].orient, TEMPSUMMON_DEAD_DESPAWN, 0);
if (pCreature)
creature = me->SummonCreature(SpiritInfo[i].entry, SpiritInfo[i].x, SpiritInfo[i].y, SpiritInfo[i].z, SpiritInfo[i].orient, TEMPSUMMON_DEAD_DESPAWN, 0);
if (creature)
{
pCreature->CastSpell(pCreature, SPELL_SPIRIT_AURA, true);
pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
pCreature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
SpiritGUID[i] = pCreature->GetGUID();
creature->CastSpell(creature, SPELL_SPIRIT_AURA, true);
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
SpiritGUID[i] = creature->GetGUID();
}
}
}

View File

@@ -150,36 +150,36 @@ class npc_zulaman_hostage : public CreatureScript
return new npc_zulaman_hostageAI(creature);
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HOSTAGE1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(creature), creature->GetGUID());
return true;
}
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
pPlayer->CLOSE_GOSSIP_MENU();
if (!pCreature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP))
if (!creature->HasFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP))
return true;
pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
InstanceScript* pInstance = pCreature->GetInstanceScript();
InstanceScript* pInstance = creature->GetInstanceScript();
if (pInstance)
{
//uint8 progress = pInstance->GetData(DATA_CHESTLOOTED);
pInstance->SetData(DATA_CHESTLOOTED, 0);
float x, y, z;
pCreature->GetPosition(x, y, z);
uint32 entry = pCreature->GetEntry();
creature->GetPosition(x, y, z);
uint32 entry = creature->GetEntry();
for (uint8 i = 0; i < 4; ++i)
{
if (HostageEntry[i] == entry)
{
pCreature->SummonGameObject(ChestEntry[i], x-2, y, z, 0, 0, 0, 0, 0, 0);
creature->SummonGameObject(ChestEntry[i], x-2, y, z, 0, 0, 0, 0, 0, 0);
break;
}
}

View File

@@ -59,9 +59,9 @@ class boss_arlokk : public CreatureScript
struct boss_arlokkAI : public ScriptedAI
{
boss_arlokkAI(Creature* pCreature) : ScriptedAI(pCreature)
boss_arlokkAI(Creature* creature) : ScriptedAI(creature)
{
m_pInstance = pCreature->GetInstanceScript();
m_pInstance = creature->GetInstanceScript();
}
InstanceScript* m_pInstance;

View File

@@ -45,24 +45,24 @@ class npc_deathly_usher : public CreatureScript
public:
npc_deathly_usher() : CreatureScript("npc_deathly_usher") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
if (uiAction == GOSSIP_ACTION_INFO_DEF)
{
pPlayer->CLOSE_GOSSIP_MENU();
pCreature->CastSpell(pPlayer, SPELL_TELEPORT_SINGLE, true);
creature->CastSpell(pPlayer, SPELL_TELEPORT_SINGLE, true);
}
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
if (pPlayer->GetQuestStatus(3628) == QUEST_STATUS_INCOMPLETE && pPlayer->HasItemCount(10757, 1))
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_USHER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(creature), creature->GetGUID());
return true;
}
@@ -88,49 +88,49 @@ class npc_fallen_hero_of_horde : public CreatureScript
public:
npc_fallen_hero_of_horde() : CreatureScript("npc_fallen_hero_of_horde") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
pPlayer->SEND_GOSSIP_MENU(1392, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1392, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+11:
pPlayer->SEND_GOSSIP_MENU(1411, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1411, creature->GetGUID());
if (pPlayer->GetQuestStatus(2784) == QUEST_STATUS_INCOMPLETE)
pPlayer->AreaExploredOrEventHappens(2784);
if (pPlayer->GetTeam() == ALLIANCE)
{
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
pPlayer->SEND_GOSSIP_MENU(1411, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1411, creature->GetGUID());
}
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
pPlayer->SEND_GOSSIP_MENU(1451, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1451, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+21:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 22);
pPlayer->SEND_GOSSIP_MENU(1452, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1452, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+22:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 23);
pPlayer->SEND_GOSSIP_MENU(1453, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1453, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+23:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 24);
pPlayer->SEND_GOSSIP_MENU(1454, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1454, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+24:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 25);
pPlayer->SEND_GOSSIP_MENU(1455, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1455, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+25:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_FALLEN5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 26);
pPlayer->SEND_GOSSIP_MENU(1456, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(1456, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+26:
pPlayer->CLOSE_GOSSIP_MENU();
@@ -140,10 +140,10 @@ public:
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
if (creature->isQuestGiver())
pPlayer->PrepareQuestMenu(creature->GetGUID());
if (pPlayer->GetQuestStatus(2784) == QUEST_STATUS_INCOMPLETE)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_H_F1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
@@ -154,7 +154,7 @@ public:
if (pPlayer->GetQuestStatus(2801) == QUEST_STATUS_INCOMPLETE && pPlayer->GetTeam() == ALLIANCE)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_H_F1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(pPlayer->GetGossipTextId(creature), creature->GetGUID());
return true;
}

View File

@@ -38,9 +38,9 @@ class boss_kruul : public CreatureScript
public:
boss_kruul() : CreatureScript("boss_kruul") { }
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new boss_kruulAI (pCreature);
return new boss_kruulAI (creature);
}
struct boss_kruulAI : public ScriptedAI

View File

@@ -51,54 +51,54 @@ class npc_ragged_john : public CreatureScript
public:
npc_ragged_john() : CreatureScript("npc_ragged_john") { }
bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 /*uiSender*/, uint32 uiAction)
bool OnGossipSelect(Player* pPlayer, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
{
pPlayer->PlayerTalkClass->ClearMenus();
switch (uiAction)
{
case GOSSIP_ACTION_INFO_DEF:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
pPlayer->SEND_GOSSIP_MENU(2714, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2714, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+1:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
pPlayer->SEND_GOSSIP_MENU(2715, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2715, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+2:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3);
pPlayer->SEND_GOSSIP_MENU(2716, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2716, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+3:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 4);
pPlayer->SEND_GOSSIP_MENU(2717, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2717, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+4:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 5);
pPlayer->SEND_GOSSIP_MENU(2718, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2718, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+5:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 6);
pPlayer->SEND_GOSSIP_MENU(2719, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2719, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+6:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT7, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 7);
pPlayer->SEND_GOSSIP_MENU(2720, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2720, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+7:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT8, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 8);
pPlayer->SEND_GOSSIP_MENU(2721, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2721, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+8:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT9, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 9);
pPlayer->SEND_GOSSIP_MENU(2722, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2722, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+9:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT10, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 10);
pPlayer->SEND_GOSSIP_MENU(2723, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2723, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+10:
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT11, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
pPlayer->SEND_GOSSIP_MENU(2725, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2725, creature->GetGUID());
break;
case GOSSIP_ACTION_INFO_DEF+11:
pPlayer->CLOSE_GOSSIP_MENU();
@@ -108,21 +108,21 @@ public:
return true;
}
bool OnGossipHello(Player* pPlayer, Creature* pCreature)
bool OnGossipHello(Player* pPlayer, Creature* creature)
{
if (pCreature->isQuestGiver())
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
if (creature->isQuestGiver())
pPlayer->PrepareQuestMenu(creature->GetGUID());
if (pPlayer->GetQuestStatus(4224) == QUEST_STATUS_INCOMPLETE)
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
pPlayer->SEND_GOSSIP_MENU(2713, pCreature->GetGUID());
pPlayer->SEND_GOSSIP_MENU(2713, creature->GetGUID());
return true;
}
CreatureAI* GetAI(Creature* pCreature) const
CreatureAI* GetAI(Creature* creature) const
{
return new npc_ragged_johnAI (pCreature);
return new npc_ragged_johnAI (creature);
}
struct npc_ragged_johnAI : public ScriptedAI

Some files were not shown because too many files have changed in this diff Show More