* Add script for Val'kyr Battle-maiden - patch provided by Drethek
* Add summonerguid to summons by spell --HG-- branch : trunk
This commit is contained in:
@@ -114,6 +114,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_ros_dark_rider' WHERE `entry`=2
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_dkc1_gothik' WHERE `entry`=28658;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_a_special_surprise' WHERE `entry` IN (29032, 29061, 29065, 29067, 29068, 29070, 29074, 29072, 29073, 29071);
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_demolisher_engineerer' WHERE `entry` IN (30400, 30499);
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_valkyr_battle_maiden' WHERE `entry`=28534;
|
||||
|
||||
/* */
|
||||
/* ZONE */
|
||||
|
||||
@@ -1203,6 +1203,7 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell
|
||||
( 51698, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 1), -- Honor Among Thieves (Rank 1)
|
||||
( 51700, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 1), -- Honor Among Thieves (Rank 2)
|
||||
( 51701, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0, 0, 1), -- Honor Among Thieves (Rank 3)
|
||||
( 51915, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0, 100, 600), -- Undying Resolve
|
||||
( 51940, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 20, 0), -- Earthliving Weapon (Passive) (Rank 1)
|
||||
( 51989, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 20, 0), -- Earthliving Weapon (Passive) (Rank 2)
|
||||
( 52004, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0, 20, 0), -- Earthliving Weapon (Passive) (Rank 3)
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_valkyr_battle_maiden' WHERE (`entry`='28534');
|
||||
INSERT iGNORE INTO `spell_proc_event` VALUES ( 51915, 0x00, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x00000000, 0, 100, 600);
|
||||
@@ -618,7 +618,6 @@ struct TRINITY_DLL_DECL npc_unworthy_initiateAI : public ScriptedAI
|
||||
m_creature->SetDisplayId(m_creature->GetNativeDisplayId());
|
||||
event_starter = 0;
|
||||
event_startet = false;
|
||||
|
||||
m_creature->SetHomePosition(home_x,home_y,home_z,home_ori);
|
||||
m_creature->GetMotionMaster()->MoveTargetedHome();
|
||||
}
|
||||
@@ -1183,6 +1182,107 @@ CreatureAI* GetAI_npc_dkc1_gothik(Creature *_Creature)
|
||||
|
||||
// npc 28912 quest 17217 boss 29001 mob 29007 go 191092
|
||||
|
||||
/*####
|
||||
## npc_valkyr_battle_maiden
|
||||
####*/
|
||||
#define SPELL_REVIVE 51918
|
||||
#define VALK_WHISPER "It is not yet your time, champion. Rise! Rise and fight once more!"
|
||||
|
||||
struct TRINITY_DLL_DECL npc_valkyr_battle_maidenAI : public ScriptedAI
|
||||
{
|
||||
npc_valkyr_battle_maidenAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
Player *Owner;
|
||||
uint32 FlyBackTimer;
|
||||
uint64 TargetGUID;
|
||||
float x, y, z;
|
||||
uint32 phase;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
m_creature->SetFlying(true);
|
||||
FlyBackTimer = 500;
|
||||
phase = 0;
|
||||
|
||||
Owner = NULL;
|
||||
m_creature->GetPosition(x, y, z);
|
||||
z += 4; x -= 3.5; y -= 5;
|
||||
m_creature->GetMotionMaster()->Clear(false);
|
||||
m_creature->Relocate(x, y, z);
|
||||
}
|
||||
|
||||
void Aggro(Unit *who){}
|
||||
|
||||
void AttackStart(Unit *who){}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if (!Owner)
|
||||
{
|
||||
TargetGUID = m_creature->GetOwnerGUID();
|
||||
Owner = Unit::GetPlayer(TargetGUID);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Owner->isAlive())
|
||||
phase = 3;
|
||||
|
||||
if (FlyBackTimer < diff)
|
||||
{
|
||||
switch(phase)
|
||||
{
|
||||
case 0:
|
||||
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
m_creature->HandleEmoteCommand(EMOTE_STATE_FLYGRABCLOSED);
|
||||
FlyBackTimer = 500;
|
||||
phase = 1;
|
||||
break;
|
||||
case 1:
|
||||
Owner->GetClosePoint(x,y,z, m_creature->GetObjectSize());
|
||||
z += 2.5; x -= 2; y -= 1.5;
|
||||
m_creature->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||
m_creature->SetUInt64Value(UNIT_FIELD_TARGET, Owner->GetGUID());
|
||||
m_creature->SetVisibility(VISIBILITY_ON);
|
||||
FlyBackTimer = 4500;
|
||||
phase = 2;
|
||||
break;
|
||||
case 2:
|
||||
if(!Owner->isRessurectRequested())
|
||||
{
|
||||
m_creature->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOMSPELL01);
|
||||
DoCast(Owner, SPELL_REVIVE,true);
|
||||
DoWhisper(VALK_WHISPER,Owner);
|
||||
}
|
||||
FlyBackTimer = 5000;
|
||||
phase = 3;
|
||||
break;
|
||||
case 3:
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
FlyBackTimer = 2000;
|
||||
phase = 4;
|
||||
break;
|
||||
case 4:
|
||||
m_creature->setDeathState(JUST_DIED);
|
||||
m_creature->RemoveCorpse();
|
||||
break;
|
||||
default:
|
||||
//Nothing To DO
|
||||
break;
|
||||
}
|
||||
}else FlyBackTimer-=diff;
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit *who){}
|
||||
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_valkyr_battle_maiden(Creature *_Creature)
|
||||
{
|
||||
return new npc_valkyr_battle_maidenAI (_Creature);
|
||||
}
|
||||
|
||||
void AddSC_the_scarlet_enclave()
|
||||
{
|
||||
Script *newscript;
|
||||
@@ -1233,4 +1333,9 @@ void AddSC_the_scarlet_enclave()
|
||||
newscript->Name = "npc_a_special_surprise";
|
||||
newscript->GetAI = &GetAI_npc_a_special_surprise;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_valkyr_battle_maiden";
|
||||
newscript->GetAI = &GetAI_npc_valkyr_battle_maiden;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
@@ -3461,11 +3461,9 @@ void Spell::EffectSummonType(uint32 i)
|
||||
TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN;
|
||||
|
||||
TempSummon * summon = m_originalCaster->SummonCreature(entry,px,py,pz,m_caster->GetOrientation(),summonType,duration);
|
||||
summon->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_originalCaster->GetGUID());
|
||||
if (properties->Category == SUMMON_CATEGORY_ALLY)
|
||||
{
|
||||
summon->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_originalCaster->GetGUID());
|
||||
summon->setFaction(m_originalCaster->getFaction());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user