#include <Player.h>
Inheritance diagram for Player:
Public Member Functions | |
Player (ZoneClient *cli) | |
Create a (mostly) uninitialized player object. | |
void | Login () |
Start the session. | |
virtual void | GenerateLoot () |
virtual void | Update (uint32 iDeltaMs) |
Update unit state depending on time passed. | |
virtual void | ReceiveDamage (Unit *iAttacker, uint32 iDamage) |
virtual void | GiveXP (uint32 iXP, Unit *iVictim, bool iGroup=true) |
virtual bool | SaveToDB () |
Save this object to database. | |
bool | LoadFromDB (uint64 iGuid) |
Load this object from database. | |
bool | DeleteFromDB () |
Delete this object from database. | |
bool | ToggleAFK () |
Toggle Away-From-Keyboard flag and return the new state. | |
const char * | GetName () |
Get character name. | |
void | KilledMonster (uint32 iEntry, const uint32 &iID) |
Notification of monster kill: update quest flags, if needed. | |
void | GiveXP (uint32 iXP, uint32 iGuid) |
void | SpawnCorpseBody () |
Destroy this player and all items in inventory for other player. | |
void | DeathDurabilityLoss (uint iPercent) |
iPercent = 24.8 fixed-point (256 = 1, 128 = 0.5 etc) | |
Public Attributes | |
uint32 | CurSelection |
Currently selected object. | |
uint32 | CurTarget |
Current target. | |
uint32 | GroupLeader |
The group leader. | |
bool | IsInGroup |
True if player is already a member of a group. | |
bool | IsInvited |
True if player is invited into a group. | |
uint32 | LootGuid |
The GUID of the (presumably dead :) creature we're looting. |
virtual void Player::GenerateLoot | ( | ) | [inline, virtual] |
void Player::GiveXP | ( | uint32 | iXP, | |
uint32 | iGuid | |||
) |
Give some XP points to this character for killing the creature with given GUID; if it is is 0, experience comes from another source (e.g. quest completion) and no purple XP message is printed.
void Player::GiveXP | ( | uint32 | iXP, | |
Unit * | iVictim, | |||
bool | iGroup = true | |||
) | [virtual] |
Give experience points to player
Reimplemented from Unit.
void Player::ReceiveDamage | ( | Unit * | iAttacker, | |
uint32 | iDamage | |||
) | [virtual] |
Receive damage from another unit. This is a important function which is overrided by most children classes because different creatures react differently to the damage they take. Also note that this is the ULTIMATE damage, e.g. all resistances, parry etc is already subtracted from the attack power. Also this function is responsible to call GiveXP() on the respective attacker unit after this unit is killed (and it is NOT neccessary that this is the iAttacker unit).
Reimplemented from Unit.