[crossfire] requestable spell lists.

Brendan Lally brenlally at gmail.com
Fri Jan 6 08:09:25 CST 2006


On 1/6/06, Mark Wedel <mwedel at sonic.net> wrote:
>   All looks good - just a one minor question:
>
> > +       <name> (1 (non-zero) length byte, followed by that many bytes
> > of ascii text)
> > +               This is the name of the spell, and should be sent to the server
> > +               in order to cast/invoke it.
> > +
> > +       <display name> (1 length byte (which may be zero) followed by that
> > +               many bytes of ascii text)
> > +               This is the name to display to the player regarding the spell.
> > +               If length is zero, then the <name> should be used instead.
>
>   Just curious what these these two names are far.  As far as I know right now,
> each spell only has one name, so not sure why there are two.

gros wanted a way to do it, I think the reasoning was that there could
be the 'internal' name of the spell, and a more flavourful display
name.

Currently I have it set up to send the name and then name_pl as the
display name, but only if it is
1) present
2) different from name.

I could of course use a different field instead ('title' maybe?)

>   As an aside - it doesn't need to be part of this patch, but it might be nice
> to have the cast/invoke command be able to tag a numeric value instead of string
> name, eg:
>
>   cast 12345
>
>   Which casts the spell associated with tag 12345.  This provides a slightly
> more efficient way of the client communicating to the server what spell to cast,
> and also provides a fairly good optimized way for the server to find the spell
> (doesn't have to worry about duplicates - just has to see if an item with that
> tag exists in the inventory (of which there is already code that does it) and
> verify it is of type spell.

This could be done quite easily, although to not break older clients,
it would have to be the case that no spell names currently start with
a number. I believe this is the case however.

one other point, should I send the face number (if there is one) too?



More information about the crossfire mailing list