*Fix Piercing Shots - by freeganja.

*Clear movement generators for unit when removing from world.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-07-22 22:52:05 +02:00
parent 974fad377e
commit 9d501da1b8
4 changed files with 30 additions and 2 deletions
+4 -1
View File
@@ -1486,7 +1486,10 @@ INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `Spell
( 56344, 0x00, 9, 0x00000018, 0x08000000, 0x00020000, 0x00000000, 0x00000000, 0, 0, 0), -- Lock and Load ( 56344, 0x00, 9, 0x00000018, 0x08000000, 0x00020000, 0x00000000, 0x00000000, 0, 0, 0), -- Lock and Load
( 48539, 0x00, 7, 0x00000010, 0x04000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0), -- Revitalize ( 48539, 0x00, 7, 0x00000010, 0x04000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0), -- Revitalize
( 48544, 0x00, 7, 0x00000010, 0x04000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0), -- Revitalize ( 48544, 0x00, 7, 0x00000010, 0x04000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0), -- Revitalize
( 48545, 0x00, 7, 0x00000010, 0x04000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0); -- Revitalize ( 48545, 0x00, 7, 0x00000010, 0x04000000, 0x00000000, 0x00040000, 0x00000000, 0, 0, 0), -- Revitalize
( 53234, 0x00, 9, 0x00020000, 0x00000001, 0x00000001, 0x00000000, 0x00000002, 0, 0, 0), -- Piercing Shots (Rank 1)
( 53237, 0x00, 9, 0x00020000, 0x00000001, 0x00000001, 0x00000000, 0x00000002, 0, 0, 0), -- Piercing Shots (Rank 2)
( 53238, 0x00, 9, 0x00020000, 0x00000001, 0x00000001, 0x00000000, 0x00000002, 0, 0, 0); -- Piercing Shots (Rank 3)
-- -------- -- --------
@@ -0,0 +1,5 @@
DELETE FROM `spell_proc_event` WHERE `entry` IN (53234, 53237, 53238);
INSERT INTO `spell_proc_event` VALUES
(53234, 0x00, 9, 0x00020000, 0x00000001, 0x00000001, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), -- Piercing Shots (Rank 1)
(53237, 0x00, 9, 0x00020000, 0x00000001, 0x00000001, 0x00000000, 0x00000002, 0.000000, 0.000000, 0), -- Piercing Shots (Rank 2)
(53238, 0x00, 9, 0x00020000, 0x00000001, 0x00000001, 0x00000000, 0x00000002, 0.000000, 0.000000, 0); -- Piercing Shots (Rank 3)
+2
View File
@@ -3368,6 +3368,8 @@ void Spell::EffectSummonType(uint32 i)
TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN; TempSummonType summonType = (duration == 0) ? TEMPSUMMON_DEAD_DESPAWN : TEMPSUMMON_TIMED_DESPAWN;
TempSummon * summon = m_originalCaster->SummonCreature(entry,px,py,pz,m_caster->GetOrientation(),summonType,duration); TempSummon * summon = m_originalCaster->SummonCreature(entry,px,py,pz,m_caster->GetOrientation(),summonType,duration);
if (!summon)
continue;
summon->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_originalCaster->GetGUID()); summon->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_originalCaster->GetGUID());
if (properties->Category == SUMMON_CATEGORY_ALLY) if (properties->Category == SUMMON_CATEGORY_ALLY)
summon->setFaction(m_originalCaster->getFaction()); summon->setFaction(m_originalCaster->getFaction());
+19 -1
View File
@@ -7349,7 +7349,25 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
break; break;
} }
case SPELLFAMILY_HUNTER: case SPELLFAMILY_HUNTER:
{
if (auraSpellInfo->SpellIconID == 3247) // Piercing Shots
{
switch (auraSpellInfo->Id)
{
case 53234: // Rank 1
case 53237: // Rank 2
case 53238: // Rank 3
trigger_spell_id = 63468;
break; break;
default:
sLog.outError("Unit::HandleProcTriggerSpell: Spell %u miss posibly Piercing Shots",auraSpellInfo->Id);
return false;
}
basepoints0 = int32(damage * triggerAmount / 100);
target = pVictim;
}
break;
}
case SPELLFAMILY_PALADIN: case SPELLFAMILY_PALADIN:
{ {
/* /*
@@ -12132,6 +12150,7 @@ void Unit::RemoveFromWorld()
ExitVehicle(); ExitVehicle();
UnsummonAllTotems(); UnsummonAllTotems();
RemoveAllControlled(); RemoveAllControlled();
GetMotionMaster()->Clear(false); // remove different non-standard movement generators.
if(m_NotifyListPos >= 0) if(m_NotifyListPos >= 0)
{ {
@@ -12164,7 +12183,6 @@ void Unit::CleanupsBeforeDelete()
getHostilRefManager().setOnlineOfflineState(false); getHostilRefManager().setOnlineOfflineState(false);
RemoveAllGameObjects(); RemoveAllGameObjects();
RemoveAllDynObjects(); RemoveAllDynObjects();
GetMotionMaster()->Clear(false); // remove different non-standard movement generators.
if(IsInWorld()) if(IsInWorld())
RemoveFromWorld(); RemoveFromWorld();