[crossfire] Spellcasting Swords & Python Troubles
Alex Schultz
alex_sch at telus.net
Wed May 25 07:23:35 CDT 2005
Andreas Kirschbaum wrote:
>
Alex Schultz wrote:
>
>>
Andreas Kirschbaum wrote:
>>
>>>
- It uses CastAbility() but not CastSpell(). CastAbility() creates
>>>
the spell object from the archetype name. Therefore it uses default
>>>
values (level 0) for the spell.
>>>
>>>
I cannot use CastSpell() (which takes a spell object) because it
>>>
does not include a "caster" parameter. Any objections to add that
>>>
parameter so that both functions (CastAbility and CastSpell)
>>>
basically have the same parameter list? (Btw: no script in
>>>
/maps-bigworld/python currently calls that function.)
>>>
>>>
>>
I don't have any objections, though for this script I prefer using a
>>
approach that allows one to set the casting level to something other
>>
than the default spell level.
>>
>
>
That is the reason why I want to add the parameter "caster" to
>
CastSpell(): this function casts the spell from the passed in spell
>
object (including all customized parameters). But currently you cannot
>
use it for your script because it re-uses the parameter "who" (the rod)
>
as the "caster". This crashes the server because the rod is not on the
>
map but in an inventory.
>
Ok, but I am currently somewhat unclear on the advantage of switching
from CastAbility to a modified CastSpell would be. The script I sent in
the last e-mail seems to work perfectly with the fix-crash.diff applied
to the server.
More information about the crossfire
mailing list