aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/scripts/world_script_texts.sql3
-rw-r--r--sql/scripts/world_scripts_full.sql2
-rw-r--r--sql/updates/9472_world_script_texts.sql3
-rw-r--r--sql/updates/9472_world_scriptname.sql2
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp2
-rw-r--r--src/server/scripts/Northrend/Icecrown Citadel/boss_lord_marrowgar.cpp66
-rw-r--r--src/server/scripts/Northrend/Icecrown Citadel/icecrown_citadel.h2
-rw-r--r--src/server/scripts/Northrend/Icecrown Citadel/instance_icecrown_citadel.cpp12
8 files changed, 55 insertions, 37 deletions
diff --git a/sql/scripts/world_script_texts.sql b/sql/scripts/world_script_texts.sql
index 9e35b9a7b49..8416c69d574 100644
--- a/sql/scripts/world_script_texts.sql
+++ b/sql/scripts/world_script_texts.sql
@@ -2649,7 +2649,8 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`
(36612,-1631006,'More bones for the offering!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16942,1,0,0,'SAY_KILL_1'),
(36612,-1631007,'Languish in damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16943,1,0,0,'SAY_KILL_2'),
(36612,-1631008,'I see... only darkness...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16944,1,0,0,'SAY_DEATH'),
- (36612,-1631009,'THE MASTER''S RAGE COURSES THROUGH ME!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16945,1,0,0,'SAY_BERSERK');
+ (36612,-1631009,'THE MASTER''S RAGE COURSES THROUGH ME!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16945,1,0,0,'SAY_BERSERK'),
+ (36612,-1631010,'Lord Marrowgar creates a whirling storm of bone!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'SAY_BONE_STORM_EMOTE'),
-- -1 632 000 ICECROWN CITADEL: FROZEN HALLS: FORGE OF SOULS
-- Bronjham
diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql
index fbdf1d5c863..9997c8984ce 100644
--- a/sql/scripts/world_scripts_full.sql
+++ b/sql/scripts/world_scripts_full.sql
@@ -830,7 +830,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_guardian_pavilion' WHERE `entry
UPDATE `instance_template` SET `script`='instance_icecrown_citadel' WHERE `map`=631;
UPDATE `creature_template` SET `ScriptName`='boss_lord_marrowgar' WHERE `entry`=36612;
UPDATE `creature_template` SET `ScriptName`='npc_coldflame' WHERE `entry`=36672;
-UPDATE `creature_template` SET `ScriptName`='npc_bone_spike' WHERE `entry`=38711;
+UPDATE `creature_template` SET `ScriptName`='npc_bone_spike' WHERE `entry`=36619;
/* IRONFORGE */
UPDATE `creature_template` SET `ScriptName`='npc_royal_historian_archesonus' WHERE `entry`=8879;
diff --git a/sql/updates/9472_world_script_texts.sql b/sql/updates/9472_world_script_texts.sql
new file mode 100644
index 00000000000..c74d80d071d
--- /dev/null
+++ b/sql/updates/9472_world_script_texts.sql
@@ -0,0 +1,3 @@
+DELETE FROM `script_texts` WHERE `entry`=-1631010;
+INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
+(36612,-1631010,'Lord Marrowgar creates a whirling storm of bone!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'SAY_BONE_STORM_EMOTE');
diff --git a/sql/updates/9472_world_scriptname.sql b/sql/updates/9472_world_scriptname.sql
new file mode 100644
index 00000000000..cd7c7aa046b
--- /dev/null
+++ b/sql/updates/9472_world_scriptname.sql
@@ -0,0 +1,2 @@
+UPDATE `creature_template` SET `ScriptName`='' WHERE `ScriptName`='npc_bone_spike';
+UPDATE `creature_template` SET `ScriptName`='npc_bone_spike' WHERE `entry`=36619;
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 31dae14c4c1..311ea7bacd0 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -16377,7 +16377,7 @@ void Unit::EnterVehicle(Vehicle *vehicle, int8 seatId)
if (GetTypeId() == TYPEID_PLAYER)
{
- if(this->ToPlayer()->isInCombat())
+ if (vehicle->GetBase()->GetTypeId() == TYPEID_PLAYER && this->ToPlayer()->isInCombat())
return;
this->ToPlayer()->InterruptNonMeleeSpells(false);
diff --git a/src/server/scripts/Northrend/Icecrown Citadel/boss_lord_marrowgar.cpp b/src/server/scripts/Northrend/Icecrown Citadel/boss_lord_marrowgar.cpp
index 9545781b5ad..23043630a2b 100644
--- a/src/server/scripts/Northrend/Icecrown Citadel/boss_lord_marrowgar.cpp
+++ b/src/server/scripts/Northrend/Icecrown Citadel/boss_lord_marrowgar.cpp
@@ -32,6 +32,7 @@ enum eScriptTexts
SAY_KILL_2 = -1631007,
SAY_DEATH = -1631008,
SAY_BERSERK = -1631009,
+ SAY_BONE_STORM_EMOTE = -1631010
};
enum eSpells
@@ -59,9 +60,10 @@ enum eEvents
EVENT_BONE_STORM_END = 5,
EVENT_ENABLE_BONE_SLICE = 6,
EVENT_ENRAGE = 7,
+ EVENT_WARN_BONE_STORM = 8,
- EVENT_COLDFLAME_TRIGGER = 8,
- EVENT_FAIL_BONED = 9
+ EVENT_COLDFLAME_TRIGGER = 9,
+ EVENT_FAIL_BONED = 10
};
enum eMovementPoints
@@ -91,9 +93,9 @@ class boss_lord_marrowgar : public CreatureScript
me->RemoveAurasDueToSpell(SPELL_BONE_STORM);
events.Reset();
events.ScheduleEvent(EVENT_ENABLE_BONE_SLICE, 10000);
- events.ScheduleEvent(EVENT_BONE_SPIKE_GRAVEYARD, urand(20000, 35000));
- events.ScheduleEvent(EVENT_COLDFLAME, urand(15000, 25000));
- events.ScheduleEvent(EVENT_BONE_STORM_BEGIN, urand(35000, 50000));
+ events.ScheduleEvent(EVENT_BONE_SPIKE_GRAVEYARD, urand(20000, 30000));
+ events.ScheduleEvent(EVENT_COLDFLAME, urand(10000, 15000));
+ events.ScheduleEvent(EVENT_WARN_BONE_STORM, urand(35000, 50000));
events.ScheduleEvent(EVENT_ENRAGE, 600000);
if (pInstance)
pInstance->SetData(DATA_LORD_MARROWGAR, NOT_STARTED);
@@ -162,20 +164,22 @@ class boss_lord_marrowgar : public CreatureScript
DoCast(me, SPELL_COLDFLAME_NORMAL);
else
DoCast(me, SPELL_COLDFLAME_BONE_STORM);
- events.ScheduleEvent(EVENT_COLDFLAME, urand(20000, 30000));
+ events.ScheduleEvent(EVENT_COLDFLAME, urand(10000, 15000));
break;
- case EVENT_BONE_STORM_BEGIN:
- {
+ case EVENT_WARN_BONE_STORM:
bBoneSlice = false;
- DoScriptText(SAY_BONE_STORM, me);
- events.ScheduleEvent(EVENT_BONE_STORM_END, uiBoneStormDuration+1);
- SpellEntry const *spellInfo = sSpellStore.LookupEntry(SPELL_BONE_STORM);
- if (Aura* pStorm = me->AddAura(spellInfo, 3, me))
- pStorm->SetDuration(int32(uiBoneStormDuration));
+ DoScriptText(SAY_BONE_STORM_EMOTE, me);
+ events.ScheduleEvent(EVENT_BONE_STORM_BEGIN, 3050);
me->FinishSpell(CURRENT_MELEE_SPELL, false);
+ DoCast(me, SPELL_BONE_STORM);
+ break;
+ case EVENT_BONE_STORM_BEGIN:
+ if (Aura* pStorm = me->GetAura(SPELL_BONE_STORM))
+ pStorm->SetDuration(int32(uiBoneStormDuration));
me->SetSpeed(MOVE_RUN, fBaseSpeed*3.0f, true);
+ DoScriptText(SAY_BONE_STORM, me);
+ events.ScheduleEvent(EVENT_BONE_STORM_END, uiBoneStormDuration+1);
// no break here
- }
case EVENT_BONE_STORM_MOVE:
{
events.ScheduleEvent(EVENT_BONE_STORM_MOVE, uiBoneStormDuration/3);
@@ -193,13 +197,14 @@ class boss_lord_marrowgar : public CreatureScript
me->SetSpeed(MOVE_RUN, fBaseSpeed, true);
events.CancelEvent(EVENT_BONE_STORM_MOVE);
events.ScheduleEvent(EVENT_ENABLE_BONE_SLICE, 10000);
- events.ScheduleEvent(EVENT_BONE_STORM_BEGIN, urand(35000, 50000));
+ events.ScheduleEvent(EVENT_WARN_BONE_STORM, urand(35000, 50000));
break;
case EVENT_ENABLE_BONE_SLICE:
bBoneSlice = true;
break;
case EVENT_ENRAGE:
DoCast(me, SPELL_BERSERK, true);
+ DoScriptText(SAY_BERSERK, me);
break;
}
}
@@ -270,7 +275,7 @@ class npc_coldflame : public CreatureScript
}
target->GetPosition(x, y, z);
- float scale = 50.0f / me->GetExactDist2d(x, y);
+ float scale = 70.0f / me->GetExactDist2d(x, y);
x = me->GetPositionX() + (x - me->GetPositionX()) * scale;
y = me->GetPositionY() + (y - me->GetPositionY()) * scale;
}
@@ -279,8 +284,8 @@ class npc_coldflame : public CreatureScript
me->GetPosition(x, y, z);
float ang = me->GetAngle(owner) - static_cast<float>(M_PI);
MapManager::NormalizeOrientation(ang);
- x += 35.0f * cosf(ang);
- y += 35.0f * sinf(ang);
+ x += 50.0f * cosf(ang);
+ y += 50.0f * sinf(ang);
}
me->GetMotionMaster()->MovePoint(POINT_TARGET_COLDFLAME, x, y, z);
events.ScheduleEvent(EVENT_COLDFLAME_TRIGGER, 400);
@@ -327,8 +332,9 @@ class npc_bone_spike : public CreatureScript
struct npc_bone_spikeAI : public Scripted_NoMovementAI
{
- npc_bone_spikeAI(Creature *pCreature) : Scripted_NoMovementAI(pCreature)
+ npc_bone_spikeAI(Creature *pCreature) : Scripted_NoMovementAI(pCreature), vehicle(pCreature->GetVehicleKit())
{
+ ASSERT(vehicle);
uiTrappedGUID = 0;
}
@@ -341,10 +347,7 @@ class npc_bone_spike : public CreatureScript
{
events.Reset();
if (Unit* trapped = Unit::GetUnit((*me), uiTrappedGUID))
- {
trapped->RemoveAurasDueToSpell(SPELL_IMPALED);
- trapped->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
- }
}
void KilledUnit(Unit *pVictim)
@@ -369,18 +372,23 @@ class npc_bone_spike : public CreatureScript
void SetTrappedUnit(Unit* unit)
{
+ unit->EnterVehicle(vehicle, 0);
uiTrappedGUID = unit->GetGUID();
- float x, y, z;
- me->GetPosition(x, y, z);
- unit->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DROWNED);
- DoCast(unit, SPELL_IMPALED, true);
- unit->NearTeleportTo(x, y, z+3.0f, unit->GetOrientation(), false);
+ }
+
+ void PassengerBoarded(Unit * who, int8 /*seatId*/, bool apply)
+ {
+ if (!apply)
+ return;
+
+ me->AddAura(SPELL_IMPALED, who);
events.ScheduleEvent(EVENT_FAIL_BONED, 8000);
}
private:
uint64 uiTrappedGUID;
EventMap events;
+ Vehicle* vehicle;
};
CreatureAI* GetAI(Creature* pCreature) const
@@ -520,4 +528,8 @@ void AddSC_boss_lord_marrowgar()
new spell_marrowgar_coldflame();
new spell_marrowgar_bone_spike_graveyard();
new spell_marrowgar_bone_storm();
+
+ // has to be done or else players threat will be wiped for impaled player and he will absorb all damage
+ if (VehicleSeatEntry* vehSeat = const_cast<VehicleSeatEntry*>(sVehicleSeatStore.LookupEntry(6206)))
+ vehSeat->m_flags |= 0x400;
}
diff --git a/src/server/scripts/Northrend/Icecrown Citadel/icecrown_citadel.h b/src/server/scripts/Northrend/Icecrown Citadel/icecrown_citadel.h
index 083c1d27ba0..a85a6fcd3ac 100644
--- a/src/server/scripts/Northrend/Icecrown Citadel/icecrown_citadel.h
+++ b/src/server/scripts/Northrend/Icecrown Citadel/icecrown_citadel.h
@@ -48,7 +48,7 @@ enum eCreatures
{
NPC_LORD_MARROWGAR = 36612,
NPC_COLDFLAME = 36672,
- NPC_BONE_SPIKE = 38711
+ NPC_BONE_SPIKE = 36619
};
enum eGameobjects
diff --git a/src/server/scripts/Northrend/Icecrown Citadel/instance_icecrown_citadel.cpp b/src/server/scripts/Northrend/Icecrown Citadel/instance_icecrown_citadel.cpp
index 78225570a5f..b25e56c1125 100644
--- a/src/server/scripts/Northrend/Icecrown Citadel/instance_icecrown_citadel.cpp
+++ b/src/server/scripts/Northrend/Icecrown Citadel/instance_icecrown_citadel.cpp
@@ -31,7 +31,7 @@ class instance_icecrown_citadel : public InstanceMapScript
memset(uiEncounterState, 0, MAX_ENCOUNTER*sizeof(uint32));
memset(uiIcewall, 0, 2*sizeof(uint32));
uiMarrowgarEntrance = 0;
- isBonedEgible = true;
+ isBonedEligible = true;
}
bool IsEncounterInProgress() const
@@ -125,7 +125,7 @@ class instance_icecrown_citadel : public InstanceMapScript
break;
case COMMAND_FAIL_BONED:
- isBonedEgible = data ? true : false;
+ isBonedEligible = data ? true : false;
}
}
@@ -137,7 +137,7 @@ class instance_icecrown_citadel : public InstanceMapScript
case CRITERIA_BONED_25N:
case CRITERIA_BONED_10H:
case CRITERIA_BONED_25H:
- return isBonedEgible;
+ return isBonedEligible;
}
return false;
@@ -152,7 +152,7 @@ class instance_icecrown_citadel : public InstanceMapScript
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
saveStream << uiEncounterState[i] << " ";
- saveStream << isBonedEgible;
+ saveStream << isBonedEligible;
OUT_SAVE_INST_DATA_COMPLETE;
return saveStream.str();
@@ -184,7 +184,7 @@ class instance_icecrown_citadel : public InstanceMapScript
uiEncounterState[i] = tmpState;
}
- loadStream >> isBonedEgible;
+ loadStream >> isBonedEligible;
} else OUT_LOAD_INST_DATA_FAIL;
OUT_LOAD_INST_DATA_COMPLETE;
@@ -194,7 +194,7 @@ class instance_icecrown_citadel : public InstanceMapScript
uint32 uiEncounterState[MAX_ENCOUNTER];
uint64 uiIcewall[2];
uint64 uiMarrowgarEntrance;
- bool isBonedEgible;
+ bool isBonedEligible;
};
InstanceScript* GetInstanceScript(InstanceMap* pMap) const