[crossfire] requestable spell lists.
Brendan Lally
brenlally at gmail.com
Thu Dec 15 14:06:41 CST 2005
I have today attached a patch to the sf tracker (which can be found at
https://sourceforge.net/tracker/index.php?func=detail&aid=1381875&group_id=13833&atid=313833
) which implements the beginnings of support for a new requestinfo
type - spell_list.
Whilst this is not complete - the cases where the spell list could be
updated are not all dealt with, and there is no proper client support
(although https://sourceforge.net/tracker/index.php?func=detail&aid=1381871&group_id=152431&atid=784287
contains a hack for jcrossclient that I've been using for testing
purposes). - it is at a stage where comments are needed. - Should any
of the fields used change, or be extended or added to? With this in
mind, I ask you to read the rest of this message which contains a
(hopefully clear) description of the changes I am considering.
requestinfo spell_list:
This is intended to allow clients to request the spell list, and get
it back in a controlled way, so that it can build
menus/lists/interfaces of whatever sort it thinks appropriate.
Additionally, it adds a new setup option, spellmon, which sends a
value if the spell list has altered. This is sent once each time it
alters (or might have altered) between sending of the stats command,
and only if requested. It sends back a value which corresponds to the
type of change that might have occurred;
1 - costs changed.
2 - attunements change
4 - spells were added or removed.
This is a bitmask, so multiple values may be sent, depending on what
the client wants to do with the information, it may or may not want to
re-request the spell_list.
from the diff to doc/Developers/protocol:
spell_list (no parameters)
This returns a list of all the spells the player knows, along with
some other information about them. The data is sent in plain text,
one spell per line in the following format.
spell name:spell level:skill:spell paths:status:mana cost:grace cost
Where:
skill is sent as the number that maps to the skill as provided
by skill info (above)
spell paths is sent as a series of space seperated words
status is a number that has the following meanings;
1 - attuned
2 - repelled
4 - denied
any or all of these may or may not be set for each spell, if so,
they add together.
All of these fields will be sent, but it is not certain that any
field will have entries. If extra fields are added later, it will be
to the end of each entry.
an example response is:
burning hands:1:174:Fire:1:4:0
holy word:1:170:Turning:0:0:4
spark shower:1:176:Electricity:0:5:0
note that in the case where the player hasn't logged in, or doesn't
have any spells, a blank list is returned (the replyinfo forms the
only line in the response)
More information about the crossfire
mailing list