|
Planeshift
|
Manager class that handles loading/searching/casting spells. More...
#include <spellmanager.h>
Public Member Functions | |
| void | Cast (gemActor *caster, const csString &spellName, float kFactor, Client *client) |
| Case a particular spell. | |
| void | EndPurifying (psCharacter *character, uint32 glyphUID) |
| Purifying on a glyph has been complete. | |
| void | HandleGlyphRequest (MsgEntry *notused, Client *client) |
| Handles a glyph request from a client. | |
| void | SendGlyphs (MsgEntry *notused, Client *client) |
| Sends out the glyphs to a client. | |
| SpellManager (ClientConnectionSet *clients, iObjectRegistry *object_reg, CacheManager *cachemanager) | |
| virtual | ~SpellManager () |
Protected Member Functions | |
| void | Cast (MsgEntry *me, Client *client) |
| Case a particular spell. | |
| psSpell * | FindSpell (Client *client, const glyphList_t &assembler) |
| Find a spell in the assorted glyphs. | |
| void | HandleAssembler (MsgEntry *me, Client *client) |
| Handles a command when player tries to research. | |
| void | HandleCancelSpell (MsgEntry *notused, Client *client) |
| void | SaveSpell (Client *client, csString spellName) |
| Save a spell to the database for when a player has researched it. | |
| void | SendSpellBook (MsgEntry *notused, Client *client) |
| Send the player's spell book. | |
| void | StartPurifying (MsgEntry *me, Client *client) |
| Start to purify a glyph. | |
Protected Attributes | |
| CacheManager * | cacheManager |
| ClientConnectionSet * | clients |
| iObjectRegistry * | object_reg |
Manager class that handles loading/searching/casting spells.
This class also manages a number of psSpell Events.
Definition at line 51 of file spellmanager.h.
| SpellManager::SpellManager | ( | ClientConnectionSet * | clients, |
| iObjectRegistry * | object_reg, | ||
| CacheManager * | cachemanager | ||
| ) |
| virtual SpellManager::~SpellManager | ( | ) | [virtual] |
Case a particular spell.
| me | message entry for the client spell caster message. |
| client | the clien that cast the spell. |
| void SpellManager::Cast | ( | gemActor * | caster, |
| const csString & | spellName, | ||
| float | kFactor, | ||
| Client * | client | ||
| ) |
Case a particular spell.
| caster | The caster of the spell. |
| spellName | The name of the spell to cast. |
| kFactor | The power factor that the spell is cast with. |
| client | The client that is casting the spell. |
| void SpellManager::EndPurifying | ( | psCharacter * | character, |
| uint32 | glyphUID | ||
| ) |
Purifying on a glyph has been complete.
This will send out a network message to the client and update it's inventory with the new purified glyph.
| character | The character this is for. |
| glyphUID | The unique ID for this item instance of the glyph. |
| psSpell* SpellManager::FindSpell | ( | Client * | client, |
| const glyphList_t & | assembler | ||
| ) | [protected] |
Find a spell in the assorted glyphs.
This checks ths list of glyphs and see if it matches any known spell. This is for when players are researching spells.
| client | The client this data is for. |
| assembler | A list of glyphs to check for spell match. |
Handles a command when player tries to research.
| client | The client this is for. |
| me | The message from that client. |
Handles a glyph request from a client.
| notused | A not used message entry. |
| client | The client that requested glyphs. |
| void SpellManager::SaveSpell | ( | Client * | client, |
| csString | spellName | ||
| ) | [protected] |
Save a spell to the database for when a player has researched it.
| client | The client that this is for. |
| spellName | The name of the spell to save for that player. |
Sends out the glyphs to a client.
Builds and sends psRequestGlyphsMessage for the client.
| notused | A not used message entry. |
| client | The client that will be sent it's current glyphs. |
Send the player's spell book.
| notused | A not used message entry. |
| client | The client that will be sent the spell book. |
Start to purify a glyph.
This will also send out notifications to the client about the start of operation.
| me | The inncomming message. |
| client | The client that this data is for. |
CacheManager* SpellManager::cacheManager [protected] |
Definition at line 162 of file spellmanager.h.
ClientConnectionSet* SpellManager::clients [protected] |
Definition at line 160 of file spellmanager.h.
iObjectRegistry* SpellManager::object_reg [protected] |
Definition at line 161 of file spellmanager.h.
1.7.3