Scripts/ICC: Fixed Deathbringer after Delay zone script's OnCreatureCreate

Also removed some UpdateEntry hacks
Followup: b4a1887c4d8df5a7729ed5c4126f6a7655a02127
This commit is contained in:
Keader authored and Aokromes committed 2018-09-02 21:25:27 +02:00
1 parent a0f3423393
commit db38a286b9
1 file changed
+33 -44
@@ -203,42 +203,6 @@ class instance_icecrown_citadel : public InstanceMapScript
case NPC_LADY_DEATHWHISPER:
LadyDeahtwhisperGUID = creature->GetGUID();
break;
case NPC_KOR_KRON_GENERAL:
if (TeamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_ALLIANCE_COMMANDER);
break;
case NPC_KOR_KRON_LIEUTENANT:
if (TeamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_SKYBREAKER_LIEUTENANT);
break;
case NPC_TORTUNOK:
if (TeamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_ALANA_MOONSTRIKE);
break;
case NPC_GERARDO_THE_SUAVE:
if (TeamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_TALAN_MOONSTRIKE);
break;
case NPC_UVLUS_BANEFIRE:
if (TeamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_MALFUS_GRIMFROST);
break;
case NPC_IKFIRUS_THE_VILE:
if (TeamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_YILI);
break;
case NPC_VOL_GUK:
if (TeamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_JEDEBIA);
break;
case NPC_HARAGG_THE_UNSEEN:
if (TeamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_NIBY_THE_ALMIGHTY);
break;
case NPC_GARROSH_HELLSCREAM:
if (TeamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_KING_VARIAN_WRYNN);
break;
case NPC_DEATHBRINGER_SAURFANG:
DeathbringerSaurfangGUID = creature->GetGUID();
break;
@@ -247,16 +211,8 @@ class instance_icecrown_citadel : public InstanceMapScript
creature->SetControlled(true, UNIT_STATE_ROOT);
break;
case NPC_SE_HIGH_OVERLORD_SAURFANG:
if (TeamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_SE_MURADIN_BRONZEBEARD, creature->GetCreatureData());
// no break;
case NPC_SE_MURADIN_BRONZEBEARD:
DeathbringerSaurfangEventGUID = creature->GetGUID();
creature->LastUsedScriptID = creature->GetScriptId();
break;
case NPC_SE_KOR_KRON_REAVER:
if (TeamInInstance == ALLIANCE)
creature->UpdateEntry(NPC_SE_SKYBREAKER_MARINE);
break;
case NPC_FESTERGUT:
FestergutGUID = creature->GetGUID();
@@ -379,6 +335,9 @@ class instance_icecrown_citadel : public InstanceMapScript
break;
}
}
if (entry == NPC_KOR_KRON_LIEUTENANT && TeamInInstance == ALLIANCE)
return NPC_SKYBREAKER_LIEUTENANT;
break;
}
case NPC_HORDE_GUNSHIP_CANNON:
@@ -404,6 +363,36 @@ class instance_icecrown_citadel : public InstanceMapScript
(TeamInInstance == HORDE && data->spawnPoint.GetPositionX() < 10.0f))
return entry;
return 0;
case NPC_SE_HIGH_OVERLORD_SAURFANG:
case NPC_SE_MURADIN_BRONZEBEARD:
return TeamInInstance == ALLIANCE ? NPC_SE_MURADIN_BRONZEBEARD : NPC_SE_HIGH_OVERLORD_SAURFANG;
case NPC_KOR_KRON_GENERAL:
case NPC_ALLIANCE_COMMANDER:
return TeamInInstance == ALLIANCE ? NPC_ALLIANCE_COMMANDER : NPC_KOR_KRON_GENERAL;
case NPC_TORTUNOK:
case NPC_ALANA_MOONSTRIKE:
return TeamInInstance == ALLIANCE ? NPC_ALANA_MOONSTRIKE : NPC_TORTUNOK;
case NPC_GERARDO_THE_SUAVE:
case NPC_TALAN_MOONSTRIKE:
return TeamInInstance == ALLIANCE ? NPC_TALAN_MOONSTRIKE : NPC_GERARDO_THE_SUAVE;
case NPC_UVLUS_BANEFIRE:
case NPC_MALFUS_GRIMFROST:
return TeamInInstance == ALLIANCE ? NPC_MALFUS_GRIMFROST : NPC_UVLUS_BANEFIRE;
case NPC_IKFIRUS_THE_VILE:
case NPC_YILI:
return TeamInInstance == ALLIANCE ? NPC_YILI : NPC_IKFIRUS_THE_VILE;
case NPC_VOL_GUK:
case NPC_JEDEBIA:
return TeamInInstance == ALLIANCE ? NPC_JEDEBIA : NPC_VOL_GUK;
case NPC_HARAGG_THE_UNSEEN:
case NPC_NIBY_THE_ALMIGHTY:
return TeamInInstance == ALLIANCE ? NPC_NIBY_THE_ALMIGHTY : NPC_HARAGG_THE_UNSEEN;
case NPC_GARROSH_HELLSCREAM:
case NPC_KING_VARIAN_WRYNN:
return TeamInInstance == ALLIANCE ? NPC_KING_VARIAN_WRYNN : NPC_GARROSH_HELLSCREAM;
case NPC_SE_KOR_KRON_REAVER:
case NPC_SE_SKYBREAKER_MARINE:
return TeamInInstance == ALLIANCE ? NPC_SE_SKYBREAKER_MARINE : NPC_SE_KOR_KRON_REAVER;
default:
break;
}