public override void UseThingWith(Player user, Position posWith, GameWorld world, byte stackposWith) { string attr = GetAttribute(Constants.ATTRIBUTE_RUNES_SPELL_NAME); if (attr != null) { Spell spell = Spell.CreateRuneSpell(attr, user, posWith); spell.Rune = this; spell.UseWithPos = posWith; spell.UseWithStackpos = stackposWith; world.GetSpellSystem().CastSpell(spell.Name, user, spell, world); return; } if (useItemsWith.ContainsKey(ItemID)) { useItemsWith[ItemID](this, user, world, posWith, stackposWith); } }
public override void UseThingWith(Player user, Position posWith, GameWorld world, byte stackposWith) { string attr = GetAttribute(Constants.ATTRIBUTE_RUNES_SPELL_NAME); if (attr != null) { Spell spell = Spell.CreateRuneSpell(attr, user, posWith); spell.Rune = this; spell.UseWithPos = posWith; spell.UseWithStackpos = stackposWith; world.GetSpellSystem().CastSpell(spell.Name, user, spell, world); return; } if (useItemsWith.ContainsKey(ItemID)) { useItemsWith[ItemID](this, user, world, posWith, stackposWith); } }