*Fix seals: command, justice, wisdom, light unleashing damage.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-04-09 14:58:25 +02:00
parent 4719ad3837
commit 02bb32f60f
4 changed files with 67 additions and 42 deletions

View File

@@ -0,0 +1,4 @@
-- Judgement
DELETE FROM `spell_bonus_data` WHERE `entry` = 54158;
INSERT INTO `spell_bonus_data` (`entry`,`direct_bonus`,`dot_bonus`,`ap_bonus`,`comments`) VALUES
('54158','0.25','0','0.16','Paladin - Unleashing spell for Seal of Wisdom, Justice and Light');

View File

@@ -667,13 +667,14 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
if(GetTypeId() == TYPEID_PLAYER && target != this
&& ((Player*)this)->IsInSameRaidWith(target))
{
/*if(index == UNIT_FIELD_BYTES_2)
// Allow targetting opposite faction in party when enabled in config
if(sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP) && index == UNIT_FIELD_BYTES_2)
{
DEBUG_LOG("-- VALUES_UPDATE: Sending '%s' the blue-group-fix from '%s' (flag)", target->GetName(), ((Player*)this)->GetName());
*data << ( m_uint32Values[ index ] & (UNIT_BYTE2_FLAG_SANCTUARY << 8) ); // this flag is at uint8 offset 1 !!
ch = true;
}
else*/
else
{
FactionTemplateEntry const *ft1, *ft2;
ft1 = ((Player*)this)->getFactionTemplateEntry();

View File

@@ -1648,29 +1648,31 @@ void Spell::EffectDummy(uint32 i)
return;
}
case 561: // Judgement of command
}
switch(m_spellInfo->Id)
{
case 20425: // Judgement of command
{
if(!unitTarget)
return;
uint32 spell_id = m_spellInfo->EffectBasePoints[i]+1;//m_currentBasePoints[i]+1;
SpellEntry const* spell_proto = sSpellStore.LookupEntry(spell_id);
SpellEntry const* spell_proto = sSpellStore.LookupEntry(damage);
if(!spell_proto)
return;
if( !unitTarget->hasUnitState(UNIT_STAT_STUNNED) && m_caster->GetTypeId()==TYPEID_PLAYER)
if(unitTarget->hasUnitState(UNIT_STAT_STUNNED) && m_caster->GetTypeId()==TYPEID_PLAYER)
{
// decreased damage (/2) for non-stunned target.
// always critical for stunned target
SpellModifier *mod = new SpellModifier;
mod->op = SPELLMOD_DAMAGE;
mod->value = -50;
mod->type = SPELLMOD_PCT;
mod->op = SPELLMOD_CRITICAL_CHANCE;
mod->value = 100;
mod->type = SPELLMOD_FLAT;
mod->spellId = m_spellInfo->Id;
mod->mask[1] = 0x00000200;
((Player*)m_caster)->AddSpellMod(mod, true);
m_caster->CastSpell(unitTarget,spell_proto,true,NULL);
// mod deleted
((Player*)m_caster)->AddSpellMod(mod, false);
}
else
@@ -1678,10 +1680,6 @@ void Spell::EffectDummy(uint32 i)
return;
}
}
switch(m_spellInfo->Id)
{
case 31789: // Righteous Defense (step 1)
{
// 31989 -> dummy effect (step 1) + dummy effect (step 2) -> 31709 (taunt like spell for each target)
@@ -4118,6 +4116,13 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
spell_bonus += int32(0.23f*m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)));
spell_bonus += int32(0.29f*m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget));
}
// Seal of Command Unleashed
else if(m_spellInfo->Id==20467)
{
spell_bonus += int32(0.16f*m_caster->GetTotalAttackPowerValue(BASE_ATTACK));
spell_bonus += int32(0.25f*m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)));
}
break;
}
case SPELLFAMILY_SHAMAN:
@@ -4915,18 +4920,33 @@ void Spell::EffectScriptEffect(uint32 effIndex)
return;
}
// all seals have aura dummy in 2 effect
Unit::AuraEffectList const& m_dummyAuras = m_caster->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraEffectList::const_iterator itr = m_dummyAuras.begin(); itr != m_dummyAuras.end(); ++itr)
Unit::AuraMap & sealAuras = m_caster->GetAuras();
for(Unit::AuraMap::iterator iter = sealAuras.begin(); iter != sealAuras.end();)
{
SpellEntry const *spellInfo = (*itr)->GetSpellProto();
// search seal (all seals have judgement's aura dummy spell id in 2 effect
if ((*itr)->GetEffIndex() != 2 || !spellInfo || !IsSealSpell(spellInfo))
continue;
SpellEntry const *judge = sSpellStore.LookupEntry((*itr)->GetAmount());
if (!judge)
continue;
spellId2 = (*itr)->GetAmount();
break;
if (IsSealSpell(iter->second->GetSpellProto()))
{
if (AuraEffect * aureff = iter->second->GetPartAura(2))
if (aureff->GetAuraName()==SPELL_AURA_DUMMY)
{
if (sSpellStore.LookupEntry(aureff->GetAmount()))
spellId2 = aureff->GetAmount();
break;
}
if (!spellId2)
{
switch (iter->first)
{
// Seal of light, wisdom, justice
case 20165:
case 20166:
case 20164:
spellId2 = 54158;
}
}
break;
}
else
++iter;
}
if (spellId1)
m_caster->CastSpell(unitTarget, spellId1, true);

View File

@@ -996,6 +996,22 @@
RelativePath="..\..\src\game\CreatureAISelector.h"
>
</File>
<File
RelativePath="..\..\src\game\CreatureEventAI.cpp"
>
</File>
<File
RelativePath="..\..\src\game\CreatureEventAI.h"
>
</File>
<File
RelativePath="..\..\src\game\CreatureEventAIMgr.cpp"
>
</File>
<File
RelativePath="..\..\src\game\CreatureEventAIMgr.h"
>
</File>
<File
RelativePath="..\..\src\game\CreatureGroups.cpp"
>
@@ -1024,22 +1040,6 @@
RelativePath="..\..\src\game\DynamicObject.h"
>
</File>
<File
RelativePath="..\..\src\game\CreatureEventAI.cpp"
>
</File>
<File
RelativePath="..\..\src\game\CreatureEventAI.h"
>
</File>
<File
RelativePath="..\..\src\game\CreatureEventAIMgr.cpp"
>
</File>
<File
RelativePath="..\..\src\game\CreatureEventAIMgr.h"
>
</File>
<File
RelativePath="..\..\src\game\FleeingMovementGenerator.cpp"
>