mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8451] Implement talent 47236 and ranks.
Added changes base at merge of patches suggested by pasdVn and Astellar.
This commit is contained in:
parent
9c5f85d309
commit
69fbe1e82f
7 changed files with 58 additions and 23 deletions
|
|
@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
|
||||||
`version` varchar(120) default NULL,
|
`version` varchar(120) default NULL,
|
||||||
`creature_ai_version` varchar(120) default NULL,
|
`creature_ai_version` varchar(120) default NULL,
|
||||||
`cache_id` int(10) default '0',
|
`cache_id` int(10) default '0',
|
||||||
`required_8444_01_mangos_mangos_string` bit(1) default NULL
|
`required_8451_01_mangos_spell_proc_event` bit(1) default NULL
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
@ -17841,6 +17841,7 @@ INSERT INTO `spell_proc_event` VALUES
|
||||||
(53569, 0x00000000, 10, 0x00200000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
(53569, 0x00000000, 10, 0x00200000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||||
(53576, 0x00000000, 10, 0x00200000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
(53576, 0x00000000, 10, 0x00200000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||||
(53601, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 6),
|
(53601, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 6),
|
||||||
|
(53646, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||||
(53671, 0x00000000, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
|
(53671, 0x00000000, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
|
||||||
(53673, 0x00000000, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
|
(53673, 0x00000000, 10, 0x00800000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0.000000, 0.000000, 0),
|
||||||
(54149, 0x00000000, 10, 0x00200000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
(54149, 0x00000000, 10, 0x00200000, 0x00010000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0),
|
||||||
|
|
|
||||||
5
sql/updates/8451_01_mangos_spell_proc_event.sql
Normal file
5
sql/updates/8451_01_mangos_spell_proc_event.sql
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
ALTER TABLE db_version CHANGE COLUMN required_8444_01_mangos_mangos_string required_8451_01_mangos_spell_proc_event bit;
|
||||||
|
|
||||||
|
DELETE FROM spell_proc_event WHERE entry = 53646;
|
||||||
|
INSERT INTO spell_proc_event VALUES
|
||||||
|
(53646, 0x00000000, 0, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000002, 0.000000, 0.000000, 0);
|
||||||
|
|
@ -97,6 +97,7 @@ pkgdata_DATA = \
|
||||||
8416_01_mangos_spell_learn_spell.sql \
|
8416_01_mangos_spell_learn_spell.sql \
|
||||||
8433_01_characters_character_account_data.sql \
|
8433_01_characters_character_account_data.sql \
|
||||||
8444_01_mangos_mangos_string.sql \
|
8444_01_mangos_mangos_string.sql \
|
||||||
|
8451_01_mangos_spell_proc_event.sql \
|
||||||
README
|
README
|
||||||
|
|
||||||
## Additional files to include when running 'make dist'
|
## Additional files to include when running 'make dist'
|
||||||
|
|
@ -174,4 +175,5 @@ EXTRA_DIST = \
|
||||||
8416_01_mangos_spell_learn_spell.sql \
|
8416_01_mangos_spell_learn_spell.sql \
|
||||||
8433_01_characters_character_account_data.sql \
|
8433_01_characters_character_account_data.sql \
|
||||||
8444_01_mangos_mangos_string.sql \
|
8444_01_mangos_mangos_string.sql \
|
||||||
|
8451_01_mangos_spell_proc_event.sql \
|
||||||
README
|
README
|
||||||
|
|
|
||||||
|
|
@ -179,11 +179,6 @@ enum SpellSchoolMask
|
||||||
SPELL_SCHOOL_MASK_ALL = ( SPELL_SCHOOL_MASK_NORMAL | SPELL_SCHOOL_MASK_MAGIC )
|
SPELL_SCHOOL_MASK_ALL = ( SPELL_SCHOOL_MASK_NORMAL | SPELL_SCHOOL_MASK_MAGIC )
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SPELL_SCHOOL_MASK_MAGIC \
|
|
||||||
( SPELL_SCHOOL_MASK_HOLY | SPELL_SCHOOL_MASK_FIRE | SPELL_SCHOOL_MASK_NATURE | \
|
|
||||||
SPELL_SCHOOL_MASK_FROST | SPELL_SCHOOL_MASK_SHADOW | \
|
|
||||||
SPELL_SCHOOL_MASK_ARCANE )
|
|
||||||
|
|
||||||
inline SpellSchools GetFirstSchoolInMask(SpellSchoolMask mask)
|
inline SpellSchools GetFirstSchoolInMask(SpellSchoolMask mask)
|
||||||
{
|
{
|
||||||
for(int i = 0; i < MAX_SPELL_SCHOOL; ++i)
|
for(int i = 0; i < MAX_SPELL_SCHOOL; ++i)
|
||||||
|
|
|
||||||
|
|
@ -6288,10 +6288,10 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
||||||
// Set trigger spell id, target, custom basepoints
|
// Set trigger spell id, target, custom basepoints
|
||||||
uint32 trigger_spell_id = auraSpellInfo->EffectTriggerSpell[triggeredByAura->GetEffIndex()];
|
uint32 trigger_spell_id = auraSpellInfo->EffectTriggerSpell[triggeredByAura->GetEffIndex()];
|
||||||
Unit* target = NULL;
|
Unit* target = NULL;
|
||||||
int32 basepoints0 = 0;
|
int32 basepoints[3] = {0, 0, 0};
|
||||||
|
|
||||||
if(triggeredByAura->GetModifier()->m_auraname == SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE)
|
if(triggeredByAura->GetModifier()->m_auraname == SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE)
|
||||||
basepoints0 = triggerAmount;
|
basepoints[0] = triggerAmount;
|
||||||
|
|
||||||
Item* castItem = triggeredByAura->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER
|
Item* castItem = triggeredByAura->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER
|
||||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGUID()) : NULL;
|
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGUID()) : NULL;
|
||||||
|
|
@ -6329,7 +6329,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
||||||
else if (auraSpellInfo->Id==43820) // Charm of the Witch Doctor (Amani Charm of the Witch Doctor trinket)
|
else if (auraSpellInfo->Id==43820) // Charm of the Witch Doctor (Amani Charm of the Witch Doctor trinket)
|
||||||
{
|
{
|
||||||
// Pct value stored in dummy
|
// Pct value stored in dummy
|
||||||
basepoints0 = pVictim->GetCreateHealth() * auraSpellInfo->EffectBasePoints[1] / 100;
|
basepoints[0] = pVictim->GetCreateHealth() * auraSpellInfo->EffectBasePoints[1] / 100;
|
||||||
target = pVictim;
|
target = pVictim;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -6499,7 +6499,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
||||||
{
|
{
|
||||||
int32 value2 = CalculateSpellDamage((*i)->GetSpellProto(),2,(*i)->GetSpellProto()->EffectBasePoints[2],this);
|
int32 value2 = CalculateSpellDamage((*i)->GetSpellProto(),2,(*i)->GetSpellProto()->EffectBasePoints[2],this);
|
||||||
// Drain Soul
|
// Drain Soul
|
||||||
CastCustomSpell(this, 18371, &basepoints0, NULL, NULL, true, castItem, triggeredByAura);
|
CastCustomSpell(this, 18371, &basepoints[0], NULL, NULL, true, castItem, triggeredByAura);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -6545,7 +6545,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
||||||
sLog.outError("Unit::HandleProcTriggerSpell: Spell %u not handled in BR", auraSpellInfo->Id);
|
sLog.outError("Unit::HandleProcTriggerSpell: Spell %u not handled in BR", auraSpellInfo->Id);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
basepoints0 = damage * triggerAmount / 100 / 3;
|
basepoints[0] = damage * triggerAmount / 100 / 3;
|
||||||
target = this;
|
target = this;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -6574,7 +6574,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
||||||
{
|
{
|
||||||
if (triggerAmount == 0)
|
if (triggerAmount == 0)
|
||||||
return false;
|
return false;
|
||||||
basepoints0 = triggerAmount * GetMaxHealth() / 100;
|
basepoints[0] = triggerAmount * GetMaxHealth() / 100;
|
||||||
trigger_spell_id = 34299;
|
trigger_spell_id = 34299;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -6643,7 +6643,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
||||||
}
|
}
|
||||||
// percent stored in effect 1 (class scripts) base points
|
// percent stored in effect 1 (class scripts) base points
|
||||||
int32 cost = originalSpell->manaCost + originalSpell->ManaCostPercentage * GetCreateMana() / 100;
|
int32 cost = originalSpell->manaCost + originalSpell->ManaCostPercentage * GetCreateMana() / 100;
|
||||||
basepoints0 = cost*auraSpellInfo->CalculateSimpleValue(1)/100;
|
basepoints[0] = cost*auraSpellInfo->CalculateSimpleValue(1)/100;
|
||||||
trigger_spell_id = 20272;
|
trigger_spell_id = 20272;
|
||||||
target = this;
|
target = this;
|
||||||
}
|
}
|
||||||
|
|
@ -6732,7 +6732,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
||||||
{
|
{
|
||||||
if(!procSpell)
|
if(!procSpell)
|
||||||
return false;
|
return false;
|
||||||
basepoints0 = procSpell->manaCost * 35 / 100;
|
basepoints[0] = procSpell->manaCost * 35 / 100;
|
||||||
trigger_spell_id = 23571;
|
trigger_spell_id = 23571;
|
||||||
target = this;
|
target = this;
|
||||||
}
|
}
|
||||||
|
|
@ -6746,7 +6746,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
||||||
if(pVictim && pVictim->isAlive())
|
if(pVictim && pVictim->isAlive())
|
||||||
pVictim->getThreatManager().modifyThreatPercent(this,-10);
|
pVictim->getThreatManager().modifyThreatPercent(this,-10);
|
||||||
|
|
||||||
basepoints0 = triggerAmount * GetMaxHealth() / 100;
|
basepoints[0] = triggerAmount * GetMaxHealth() / 100;
|
||||||
trigger_spell_id = 31616;
|
trigger_spell_id = 31616;
|
||||||
target = this;
|
target = this;
|
||||||
}
|
}
|
||||||
|
|
@ -6781,7 +6781,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
||||||
if (!((Player*)this)->isHonorOrXPTarget(pVictim))
|
if (!((Player*)this)->isHonorOrXPTarget(pVictim))
|
||||||
return false;
|
return false;
|
||||||
trigger_spell_id = 50475;
|
trigger_spell_id = 50475;
|
||||||
basepoints0 = damage * triggerAmount / 100;
|
basepoints[0] = damage * triggerAmount / 100;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -6811,7 +6811,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
||||||
// This spell originally trigger 13567 - Dummy Trigger (vs dummy efect)
|
// This spell originally trigger 13567 - Dummy Trigger (vs dummy efect)
|
||||||
case 26467:
|
case 26467:
|
||||||
{
|
{
|
||||||
basepoints0 = damage * 15 / 100;
|
basepoints[0] = damage * 15 / 100;
|
||||||
target = pVictim;
|
target = pVictim;
|
||||||
trigger_spell_id = 26470;
|
trigger_spell_id = 26470;
|
||||||
break;
|
break;
|
||||||
|
|
@ -6917,13 +6917,13 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
||||||
// Bloodthirst (($m/100)% of max health)
|
// Bloodthirst (($m/100)% of max health)
|
||||||
case 23880:
|
case 23880:
|
||||||
{
|
{
|
||||||
basepoints0 = int32(GetMaxHealth() * triggerAmount / 100);
|
basepoints[0] = int32(GetMaxHealth() * triggerAmount / 100);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Shamanistic Rage triggered spell
|
// Shamanistic Rage triggered spell
|
||||||
case 30824:
|
case 30824:
|
||||||
{
|
{
|
||||||
basepoints0 = int32(GetTotalAttackPowerValue(BASE_ATTACK) * triggerAmount / 100);
|
basepoints[0] = int32(GetTotalAttackPowerValue(BASE_ATTACK) * triggerAmount / 100);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Enlightenment (trigger only from mana cost spells)
|
// Enlightenment (trigger only from mana cost spells)
|
||||||
|
|
@ -6933,6 +6933,34 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// Demonic Pact
|
||||||
|
case 48090:
|
||||||
|
{
|
||||||
|
// As the spell is proced from pet's attack - find owner
|
||||||
|
Unit* owner = GetOwner();
|
||||||
|
if (!owner || owner->GetTypeId() != TYPEID_PLAYER)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// This spell doesn't stack, but refreshes duration. So we receive current bonuses to minus them later.
|
||||||
|
int32 curBonus = 0;
|
||||||
|
if (Aura* aur = owner->GetAura(48090,0))
|
||||||
|
curBonus = aur->GetModifier()->m_amount;
|
||||||
|
int32 spellDamage = owner->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_MAGIC) - curBonus;
|
||||||
|
if(spellDamage <= 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// percent stored in owner talent dummy
|
||||||
|
AuraList const& dummyAuras = owner->GetAurasByType(SPELL_AURA_DUMMY);
|
||||||
|
for (AuraList::const_iterator i = dummyAuras.begin(); i != dummyAuras.end(); ++i)
|
||||||
|
{
|
||||||
|
if ((*i)->GetSpellProto()->SpellIconID == 3220)
|
||||||
|
{
|
||||||
|
basepoints[0] = basepoints[1] = int32(spellDamage * (*i)->GetModifier()->m_amount / 100);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
// Sword and Board
|
// Sword and Board
|
||||||
case 50227:
|
case 50227:
|
||||||
{
|
{
|
||||||
|
|
@ -7018,8 +7046,12 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
||||||
if(!target || target!=this && !target->isAlive())
|
if(!target || target!=this && !target->isAlive())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if(basepoints0)
|
if(basepoints[0] || basepoints[1] || basepoints[2])
|
||||||
CastCustomSpell(target,trigger_spell_id,&basepoints0,NULL,NULL,true,castItem,triggeredByAura);
|
CastCustomSpell(target,trigger_spell_id,
|
||||||
|
basepoints[0] ? &basepoints[0] : NULL,
|
||||||
|
basepoints[1] ? &basepoints[1] : NULL,
|
||||||
|
basepoints[2] ? &basepoints[2] : NULL,
|
||||||
|
true,castItem,triggeredByAura);
|
||||||
else
|
else
|
||||||
CastSpell(target,trigger_spell_id,true,castItem,triggeredByAura);
|
CastSpell(target,trigger_spell_id,true,castItem,triggeredByAura);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "8450"
|
#define REVISION_NR "8451"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#ifndef __REVISION_SQL_H__
|
#ifndef __REVISION_SQL_H__
|
||||||
#define __REVISION_SQL_H__
|
#define __REVISION_SQL_H__
|
||||||
#define REVISION_DB_CHARACTERS "required_8433_01_characters_character_account_data"
|
#define REVISION_DB_CHARACTERS "required_8433_01_characters_character_account_data"
|
||||||
#define REVISION_DB_MANGOS "required_8444_01_mangos_mangos_string"
|
#define REVISION_DB_MANGOS "required_8451_01_mangos_spell_proc_event"
|
||||||
#define REVISION_DB_REALMD "required_8332_01_realmd_realmcharacters"
|
#define REVISION_DB_REALMD "required_8332_01_realmd_realmcharacters"
|
||||||
#endif // __REVISION_SQL_H__
|
#endif // __REVISION_SQL_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue