mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[11260] Add wrapper for creature vistual item set.
This commit is contained in:
parent
a6d155fc54
commit
b588ea9db3
6 changed files with 41 additions and 36 deletions
|
|
@ -6311,13 +6311,10 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
|
|||
|
||||
if (Item* pItem = ((Player*)unitTarget)->GetWeaponForAttack(BASE_ATTACK))
|
||||
{
|
||||
if (const ItemEntry *dbcitem = sItemStore.LookupEntry(pItem->GetProto()->ItemId))
|
||||
{
|
||||
m_caster->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, dbcitem->ID);
|
||||
((Creature*)m_caster)->SetVirtualItem(VIRTUAL_ITEM_SLOT_0, pItem->GetEntry());
|
||||
|
||||
// Unclear what this spell should do
|
||||
unitTarget->CastSpell(m_caster, m_spellInfo->CalculateSimpleValue(eff_idx), true);
|
||||
}
|
||||
// Unclear what this spell should do
|
||||
unitTarget->CastSpell(m_caster, m_spellInfo->CalculateSimpleValue(eff_idx), true);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
@ -6426,13 +6423,10 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
|
|||
|
||||
if (Item* pItem = ((Player*)unitTarget)->GetWeaponForAttack(OFF_ATTACK))
|
||||
{
|
||||
if (const ItemEntry *dbcitem = sItemStore.LookupEntry(pItem->GetProto()->ItemId))
|
||||
{
|
||||
m_caster->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, dbcitem->ID);
|
||||
((Creature*)m_caster)->SetVirtualItem(VIRTUAL_ITEM_SLOT_1, pItem->GetEntry());
|
||||
|
||||
// Unclear what this spell should do
|
||||
unitTarget->CastSpell(m_caster, m_spellInfo->CalculateSimpleValue(eff_idx), true);
|
||||
}
|
||||
// Unclear what this spell should do
|
||||
unitTarget->CastSpell(m_caster, m_spellInfo->CalculateSimpleValue(eff_idx), true);
|
||||
}
|
||||
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue