mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[9984] Implement item 43214 work.
* Original version suggested by timmit. * Required DB support for target requirement.
This commit is contained in:
parent
6ce82e4914
commit
86bef7ace5
5 changed files with 27 additions and 17 deletions
|
|
@ -516,6 +516,8 @@ INSERT INTO spell_check (spellid,SpellFamilyName,SpellFamilyMaskA,SpellFamilyMas
|
||||||
(57669,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Replenishment', 'Spell::SetTargetMap'),
|
(57669,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Replenishment', 'Spell::SetTargetMap'),
|
||||||
(57723,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Exhaustion', 'Spell::cast'),
|
(57723,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Exhaustion', 'Spell::cast'),
|
||||||
(57724,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Sated', 'Spell::cast'),
|
(57724,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Sated', 'Spell::cast'),
|
||||||
|
(57908, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Stain Cloth', 'Spell::EffectDummy'),
|
||||||
|
(57915,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Create Cloth', 'Spell::EffectDummy'),
|
||||||
(58067,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Refreshment', 'Spell::EffectScriptEffect'),
|
(58067,-1, -1, -1, -1, -1, -1, -1, -1,-1,'Refreshment', 'Spell::EffectScriptEffect'),
|
||||||
(58367,-1, -1, -1, -1, -1, -1, -1, 4,-1,'Glyph of Execution', 'Spell::EffectDummy'),
|
(58367,-1, -1, -1, -1, -1, -1, -1, 4,-1,'Glyph of Execution', 'Spell::EffectDummy'),
|
||||||
(58418, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Portal to Orgrimmar', 'Spell::EffectDummy'),
|
(58418, 0, -1, -1, -1, -1, -1, 3, -1,-1,'Portal to Orgrimmar', 'Spell::EffectDummy'),
|
||||||
|
|
|
||||||
|
|
@ -3857,10 +3857,7 @@ void Spell::TakeCastItem()
|
||||||
((Player*)m_caster)->DestroyItemCount(m_CastItem, count, true);
|
((Player*)m_caster)->DestroyItemCount(m_CastItem, count, true);
|
||||||
|
|
||||||
// prevent crash at access to deleted m_targets.getItemTarget
|
// prevent crash at access to deleted m_targets.getItemTarget
|
||||||
if(m_CastItem == m_targets.getItemTarget())
|
ClearCastItem();
|
||||||
m_targets.setItemTarget(NULL);
|
|
||||||
|
|
||||||
m_CastItem = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -6635,3 +6632,11 @@ void Spell::SelectMountByAreaAndSkill(Unit* target, uint32 spellId75, uint32 spe
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Spell::ClearCastItem()
|
||||||
|
{
|
||||||
|
if (m_CastItem==m_targets.getItemTarget())
|
||||||
|
m_targets.setItemTarget(NULL);
|
||||||
|
|
||||||
|
m_CastItem = NULL;
|
||||||
|
}
|
||||||
|
|
@ -497,6 +497,7 @@ class Spell
|
||||||
void CastTriggerSpells();
|
void CastTriggerSpells();
|
||||||
|
|
||||||
void CleanupTargetList();
|
void CleanupTargetList();
|
||||||
|
void ClearCastItem();
|
||||||
|
|
||||||
static void SelectMountByAreaAndSkill(Unit* target, uint32 spellId75, uint32 spellId150, uint32 spellId225, uint32 spellId300, uint32 spellIdSpecial);
|
static void SelectMountByAreaAndSkill(Unit* target, uint32 spellId75, uint32 spellId150, uint32 spellId225, uint32 spellId300, uint32 spellIdSpecial);
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
|
|
@ -1686,6 +1686,17 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
case 57908: // Stain Cloth
|
||||||
|
{
|
||||||
|
// nothing do more
|
||||||
|
finish();
|
||||||
|
|
||||||
|
m_caster->CastSpell(m_caster, 57915, false, m_CastItem);
|
||||||
|
|
||||||
|
// cast item deleted
|
||||||
|
ClearCastItem();
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 58418: // Portal to Orgrimmar
|
case 58418: // Portal to Orgrimmar
|
||||||
case 58420: // Portal to Stormwind
|
case 58420: // Portal to Stormwind
|
||||||
return; // implemented in EffectScript[0]
|
return; // implemented in EffectScript[0]
|
||||||
|
|
@ -3719,10 +3730,7 @@ void Spell::EffectSummonChangeItem(SpellEffectIndex eff_idx)
|
||||||
player->DestroyItem(m_CastItem->GetBagSlot(), m_CastItem->GetSlot(), true);
|
player->DestroyItem(m_CastItem->GetBagSlot(), m_CastItem->GetSlot(), true);
|
||||||
|
|
||||||
// prevent crash at access and unexpected charges counting with item update queue corrupt
|
// prevent crash at access and unexpected charges counting with item update queue corrupt
|
||||||
if (m_CastItem==m_targets.getItemTarget())
|
ClearCastItem();
|
||||||
m_targets.setItemTarget(NULL);
|
|
||||||
|
|
||||||
m_CastItem = NULL;
|
|
||||||
|
|
||||||
player->StoreItem( dest, pNewItem, true);
|
player->StoreItem( dest, pNewItem, true);
|
||||||
return;
|
return;
|
||||||
|
|
@ -3737,10 +3745,7 @@ void Spell::EffectSummonChangeItem(SpellEffectIndex eff_idx)
|
||||||
player->DestroyItem(m_CastItem->GetBagSlot(), m_CastItem->GetSlot(), true);
|
player->DestroyItem(m_CastItem->GetBagSlot(), m_CastItem->GetSlot(), true);
|
||||||
|
|
||||||
// prevent crash at access and unexpected charges counting with item update queue corrupt
|
// prevent crash at access and unexpected charges counting with item update queue corrupt
|
||||||
if (m_CastItem==m_targets.getItemTarget())
|
ClearCastItem();
|
||||||
m_targets.setItemTarget(NULL);
|
|
||||||
|
|
||||||
m_CastItem = NULL;
|
|
||||||
|
|
||||||
player->BankItem( dest, pNewItem, true);
|
player->BankItem( dest, pNewItem, true);
|
||||||
return;
|
return;
|
||||||
|
|
@ -3755,10 +3760,7 @@ void Spell::EffectSummonChangeItem(SpellEffectIndex eff_idx)
|
||||||
player->DestroyItem(m_CastItem->GetBagSlot(), m_CastItem->GetSlot(), true);
|
player->DestroyItem(m_CastItem->GetBagSlot(), m_CastItem->GetSlot(), true);
|
||||||
|
|
||||||
// prevent crash at access and unexpected charges counting with item update queue corrupt
|
// prevent crash at access and unexpected charges counting with item update queue corrupt
|
||||||
if (m_CastItem==m_targets.getItemTarget())
|
ClearCastItem();
|
||||||
m_targets.setItemTarget(NULL);
|
|
||||||
|
|
||||||
m_CastItem = NULL;
|
|
||||||
|
|
||||||
player->EquipItem( dest, pNewItem, true);
|
player->EquipItem( dest, pNewItem, true);
|
||||||
player->AutoUnequipOffhandIfNeed();
|
player->AutoUnequipOffhandIfNeed();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9983"
|
#define REVISION_NR "9984"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue