ManaPlus
|
Functions | |
void | triggerAttr (const AttributesT id, const int64_t old) |
void | triggerStat (const AttributesT id, const int old1, const int old2) |
int64_t | getAttribute64 (const AttributesT id) |
int32_t | getAttribute (const AttributesT id) |
void | setAttribute (const AttributesT id, const int64_t value, const Notify notify) |
int | getSkillLevel (const int id) |
void | setSkillLevel (const int id, const int value) |
int | getStatBase (const AttributesT id) |
void | setStatBase (const AttributesT id, const int value, const Notify notify) |
int | getStatMod (const AttributesT id) |
void | setStatMod (const AttributesT id, const int value, const Notify notify) |
int | getStatEffective (const AttributesT id) |
const std::pair< int, int > | getStatExperience (const AttributesT id) |
Inventory * | getInventory () |
Inventory * | getStorageInventory () |
Inventory * | getCartInventory () |
void | clearInventory () |
Equipment * | getEquipment () |
const Item * | getEquipment (const unsigned int slot) |
void | setEquipmentBackend (Equipment::Backend *const backend) |
void | equipItem (const Item *const item, const Sfx sfx) |
void | unequipItem (const Item *const item, const Sfx sfx) |
void | useItem (const Item *const item, const Sfx sfx) |
void | useEquipItem (const Item *const item, const int16_t useType, const Sfx sfx) |
void | useEquipItem2 (const Item *const item, const int16_t useType, const Sfx sfx) |
void | dropItem (const Item *const item, const int amount, const Sfx sfx) |
void | pickUpItem (const FloorItem *const item, const Sfx sfx) |
void | setBackend (const PlayerInfoBackend &backend) |
void | setCharId (const int charId) |
int | getCharId () |
Trading | isTrading () |
void | setTrading (const Trading trading) |
void | updateAttrs () |
void | init () |
void | deinit () |
void | loadData () |
void | clear () |
bool | isTalking () |
void | gameDestroyed () |
void | stateChange (const StateT state) |
static void | saveProtectedItems () |
void | protectItem (const int id) |
void | unprotectItem (const int id) |
bool | isItemProtected (const int id) |
void | setMercenary (MercenaryInfo *const info) |
void | setMercenaryBeing (Being *const being) |
void | setElemental (const BeingId id) |
BeingId | getElementalId () |
MercenaryInfo * | getMercenary () |
void | setPet (PetInfo *const info) |
void | setPetBeing (Being *const being) |
PetInfo * | getPet () |
BeingId | getPetBeingId () |
void | setHomunculus (HomunculusInfo *const info) |
void | setHomunculusBeing (Being *const being) |
HomunculusInfo * | getHomunculus () |
BeingId | getHomunculusId () |
BeingId | getMercenaryId () |
void | updateAttackAi (const BeingId targetId, const Keep keep) |
std::string | getRoomName () |
void | setRoomName (const std::string &name) |
bool | isInRoom () |
void | setGuildPositionFlags (const GuildPositionFlags::Type pos) |
GuildPositionFlags::Type | getGuildPositionFlags () |
void | enableVending (const bool b) |
bool | isVending () |
void | setServerLanguage (const int lang) |
int | getServerLanguage () |
Variables | |
PlayerInfoBackend | mData |
int | mCharId = 0 |
Inventory * | mInventory = 0 |
Inventory * | mCartInventory = 0 |
MercenaryInfo * | mMercenary = 0 |
HomunculusInfo * | mHomunculus = 0 |
PetInfo * | mPet = 0 |
std::string | mRoomName |
Equipment * | mEquipment = 0 |
BeingId | mPetBeingId = BeingId_zero |
GuildPositionFlags::Type | mGuildPositionFlags = GuildPositionFlags::None |
BeingId | mElementalId = BeingId_zero |
Trading | mTrading = Trading_false |
bool | mVending = false |
int | mLevelProgress = 0 |
int | mServerLanguage = -1 |
std::set< int > | mProtectedItems |
A database like namespace which holds global info about the localplayer
void PlayerInfo::clear | ( | ) |
Definition at line 452 of file playerinfo.cpp.
References BeingId_zero, mData, mPetBeingId, and PlayerInfoBackend::mSkills.
Referenced by mse::msevector< _Ty, _A >::clear(), Game::Game(), Client::gameClear(), PRAGMA45(), and SoundDB::unload().
void PlayerInfo::clearInventory | ( | ) |
Clears the player's inventory and equipment.
Definition at line 212 of file playerinfo.cpp.
References Equipment::clear(), Inventory::clear(), mEquipment, and mInventory.
Referenced by deinit().
void PlayerInfo::deinit | ( | ) |
Definition at line 438 of file playerinfo.cpp.
References BeingId_zero, clearInventory(), delete2, mMercenary, and mPetBeingId.
Definition at line 354 of file playerinfo.cpp.
References ItemSoundEvent::DROP, Net::InventoryHandler::dropItem(), Item::getId(), inventoryHandler, mProtectedItems, ItemSoundManager::playSfx(), and Sfx_true.
Referenced by InventoryWindow::action(), DropShortcut::dropFirst(), DropShortcut::dropItem(), and ItemAmountWindow::finish().
void PlayerInfo::enableVending | ( | const bool | b | ) |
Definition at line 658 of file playerinfo.cpp.
References mVending.
Referenced by EAthena::BuyingStoreHandler::close(), EAthena::VendingHandler::close(), EAthena::BuyingStoreRecv::processBuyingStoreHideBoard(), EAthena::BuyingStoreRecv::processBuyingStoreOwnItems(), EAthena::VendingRecv::processHideBoard(), and EAthena::VendingRecv::processOpen().
Definition at line 238 of file playerinfo.cpp.
References ItemSoundEvent::EQUIP, Net::InventoryHandler::equipItem(), inventoryHandler, ItemSoundManager::playSfx(), and Sfx_true.
Referenced by EquipmentWindow::action(), LocalPlayer::changeEquipmentBeforeAttack(), ItemShortcut::equipItem(), LocalPlayer::imitateOutfit(), EquipmentWindow::mouseReleased(), and OutfitWindow::wearOutfit().
void PlayerInfo::gameDestroyed | ( | ) |
Definition at line 463 of file playerinfo.cpp.
References delete2, mCartInventory, mEquipment, and mInventory.
Referenced by Game::~Game().
int32_t PlayerInfo::getAttribute | ( | const AttributesT | id | ) |
Definition at line 102 of file playerinfo.cpp.
References CAST_S32, PlayerInfoBackend::mAttributes, and mData.
Referenced by ChangeDisplay::action(), ShopWindow::action(), TradeWindow::action(), LocalPlayer::attributeChanged(), DialogsManager::attributeChanged(), ChatWindow::attributeChanged(), KillStats::attributeChanged(), StatusWindow::attributeChanged(), Being::drawPlayerSpriteAt(), LocalPlayer::getLevel(), ShopWindow::giveList(), ActorManager::heal(), EAthena::PlayerHandler::increaseSkill(), TmwAthena::PlayerHandler::increaseSkill(), SpellManager::invoke(), InventoryWindow::mouseMoved(), MiniStatusWindow::mouseMoved(), EAthena::BuyingStoreRecv::processBuyingStoreItemsList(), EAthena::VendingRecv::processItemsList(), EAthena::MarketRecv::processMarketOpen(), EAthena::BuySellRecv::processNpcBuy(), TmwAthena::BuySellRecv::processNpcBuy(), TmwAthena::BuySellRecv::processNpcBuyResponse(), Ea::BuySellRecv::processNpcSell(), EAthena::PlayerRecv::processPlayerHeal(), Ea::PlayerRecv::processPlayerStatUpdate4(), KillStats::recalcStats(), EAthena::PlayerHandler::setStat(), TmwAthena::PlayerHandler::setStat(), ShopWindow::showList(), StatsPageBasic::StatsPageBasic(), StatusWindow::StatusWindow(), LocalPlayer::tryMagic(), ChangeDisplay::update(), KillStats::update(), SkillDialog::update(), StatusWindow::updateHPBar(), StatusWindow::updateJobBar(), StatusWindow::updateLevelLabel(), StatusWindow::updateMoneyBar(), StatusWindow::updateMPBar(), InventoryWindow::updateWeight(), StatusWindow::updateWeightBar(), and StatusWindow::updateXPBar().
int64_t PlayerInfo::getAttribute64 | ( | const AttributesT | id | ) |
Returns the value of the given attribute.
Definition at line 94 of file playerinfo.cpp.
References PlayerInfoBackend::mAttributes, and mData.
Referenced by KillStats::action(), KillStats::gainXp(), KillStats::KillStats(), MiniStatusWindow::mouseMoved(), and StatusWindow::StatusWindow().
Inventory * PlayerInfo::getCartInventory | ( | ) |
Definition at line 207 of file playerinfo.cpp.
References mCartInventory.
Referenced by ShopWindow::action(), createGuiWindows(), ItemContainer::mouseReleased(), ShopListBox::mouseReleased(), EAthena::InventoryRecv::processCartInfo(), EAthena::InventoryRecv::processInventoryStartContinue(), EAthena::InventoryRecv::processPlayerCartAdd(), EAthena::InventoryRecv::processPlayerCartRemove(), and EAthena::VendingRecv::processReport().
int PlayerInfo::getCharId | ( | ) |
Definition at line 386 of file playerinfo.cpp.
References mCharId.
Referenced by EAthena::GuildHandler::leave(), and EAthena::GuildRecv::processGuildLeave2().
BeingId PlayerInfo::getElementalId | ( | ) |
Definition at line 544 of file playerinfo.cpp.
References mElementalId.
Referenced by Being::drawElementalSpriteAt().
Equipment * PlayerInfo::getEquipment | ( | ) |
Returns the player's equipment.
Definition at line 220 of file playerinfo.cpp.
References mEquipment.
Referenced by createGuiWindows(), LocalPlayer::getAttackRange(), LocalPlayer::imitateOutfit(), EAthena::InventoryRecv::processInventoryEndContinue(), EAthena::InventoryRecv::processPlayerEquipment(), TmwAthena::InventoryRecv::processPlayerEquipment(), EAthena::InventoryRecv::processPlayerInventory(), TmwAthena::InventoryRecv::processPlayerInventory(), EAthena::InventoryRecv::processPlayerInventoryAdd(), and TmwAthena::InventoryRecv::processPlayerInventoryAdd().
const Item * PlayerInfo::getEquipment | ( | const unsigned int | slot | ) |
Returns the player's equipment at the given slot.
Definition at line 225 of file playerinfo.cpp.
References Equipment::getEquipment(), and mEquipment.
GuildPositionFlags::Type PlayerInfo::getGuildPositionFlags | ( | ) |
Definition at line 653 of file playerinfo.cpp.
References mGuildPositionFlags.
HomunculusInfo * PlayerInfo::getHomunculus | ( | ) |
Definition at line 603 of file playerinfo.cpp.
References mHomunculus.
Referenced by Being::drawHomunculusSpriteAt(), EAthena::HomunculusRecv::processHomunculusData(), EAthena::HomunculusRecv::processHomunculusInfo1(), EAthena::HomunculusRecv::processHomunculusInfo2(), EAthena::HomunculusRecv::processHomunculusInfo3(), BeingPopup::show(), and PopupMenu::showPopup().
BeingId PlayerInfo::getHomunculusId | ( | ) |
Definition at line 608 of file playerinfo.cpp.
References BeingId_zero, HomunculusInfo::id, and mHomunculus.
Referenced by EAthena::HomunculusHandler::attack(), EAthena::HomunculusHandler::move(), and EAthena::HomunculusHandler::moveToMaster().
Inventory * PlayerInfo::getInventory | ( | ) |
Returns the player's inventory.
Definition at line 195 of file playerinfo.cpp.
References mInventory.
Referenced by EquipmentWindow::action(), NpcDialog::action(), ShopWindow::action(), NpcDialog::addCraftItem(), LocalPlayer::changeEquipmentBeforeAttack(), Ea::EquipBackend::clear(), OutfitWindow::copyFromEquiped(), createGuiWindows(), ItemShortcutContainer::draw(), VirtShortcutContainer::draw(), OutfitWindow::draw(), DropShortcut::dropFirst(), DropShortcut::dropItem(), ItemShortcut::equipItem(), Ea::EquipBackend::getEquipment(), Actions::getItemByInvIndex(), ShopWindow::giveList(), LocalPlayer::imitateOutfit(), TradeWindow::initTrade(), MiniStatusWindow::MiniStatusWindow(), ItemShortcutContainer::mouseDragged(), VirtShortcutContainer::mouseDragged(), OutfitWindow::mouseDragged(), ItemShortcutContainer::mouseMoved(), VirtShortcutContainer::mouseMoved(), MiniStatusWindow::mouseMoved(), VirtShortcutContainer::mousePressed(), ItemContainer::mouseReleased(), ShopListBox::mouseReleased(), EquipmentWindow::mouseReleased(), EAthena::InventoryRecv::processBindItem(), EAthena::BuyingStoreRecv::processBuyingStoreDeleteItem(), EAthena::BuyingStoreRecv::processBuyingStoreItemsList(), EAthena::PetRecv::processEggsList(), EAthena::InventoryRecv::processInventoryEndContinue(), EAthena::InventoryRecv::processInventoryExpansionInfo(), EAthena::InventoryRecv::processInventoryStartContinue(), EAthena::InventoryRecv::processItemMoveFailed(), Ea::InventoryRecv::processItemUseResponse(), Ea::BuySellRecv::processNpcSell(), EAthena::InventoryRecv::processPlayerEquipment(), TmwAthena::InventoryRecv::processPlayerEquipment(), EAthena::InventoryRecv::processPlayerInsertCard(), EAthena::InventoryRecv::processPlayerInventory(), TmwAthena::InventoryRecv::processPlayerInventory(), EAthena::InventoryRecv::processPlayerInventoryAdd(), TmwAthena::InventoryRecv::processPlayerInventoryAdd(), EAthena::InventoryRecv::processPlayerInventoryRemove(), TmwAthena::InventoryRecv::processPlayerInventoryRemove(), EAthena::InventoryRecv::processPlayerInventoryRemove2(), EAthena::InventoryRecv::processPlayerInventoryUse(), TmwAthena::InventoryRecv::processPlayerInventoryUse(), EAthena::InventoryRecv::processPlayerItemRentalExpired(), EAthena::InventoryRecv::processPlayerRefine(), EAthena::InventoryRecv::processPlayerUseCard(), EAthena::Mail2Recv::processRemoveItemResult(), ShopWindow::processRequest(), EAthena::TradeRecv::processTradeItemAddResponse(), TmwAthena::TradeRecv::processTradeItemAddResponse(), NpcDialog::restoreVirtuals(), ItemShortcutContainer::safeDraw(), VirtShortcutContainer::safeDraw(), OutfitWindow::safeDraw(), BuyingStoreSellDialog::sellAction(), MailEditWindow::sendMail(), Ea::EquipBackend::setEquipment(), PopupMenu::showItemPopup(), ShopWindow::showList(), ShopWindow::sumAmount(), ItemShortcut::unequipItem(), OutfitWindow::unequipNotInOutfit(), StatusWindow::updateInvSlotsBar(), ItemShortcut::useItem(), OutfitWindow::wearOutfit(), and MiniStatusWindow::~MiniStatusWindow().
MercenaryInfo * PlayerInfo::getMercenary | ( | ) |
Definition at line 549 of file playerinfo.cpp.
References mMercenary.
Referenced by EAthena::BeingRecv::createBeing2(), and Being::drawMercenarySpriteAt().
BeingId PlayerInfo::getMercenaryId | ( | ) |
Definition at line 613 of file playerinfo.cpp.
References BeingId_zero, MercenaryInfo::id, and mMercenary.
Referenced by EAthena::MercenaryHandler::attack(), EAthena::MercenaryHandler::move(), and EAthena::MercenaryHandler::moveToMaster().
PetInfo * PlayerInfo::getPet | ( | ) |
Definition at line 576 of file playerinfo.cpp.
References mPet.
Referenced by EAthena::PetRecv::processPetData(), EAthena::PetRecv::processPetStatus(), and BeingPopup::show().
BeingId PlayerInfo::getPetBeingId | ( | ) |
Definition at line 581 of file playerinfo.cpp.
References mPetBeingId.
Referenced by EAthena::BeingRecv::createBeing2(), and Actions::getPet().
std::string PlayerInfo::getRoomName | ( | ) |
Definition at line 633 of file playerinfo.cpp.
References mRoomName.
Referenced by ChatWindow::joinRoom().
int PlayerInfo::getServerLanguage | ( | ) |
Definition at line 677 of file playerinfo.cpp.
References mServerLanguage.
Referenced by getServerLang().
int PlayerInfo::getSkillLevel | ( | const int | id | ) |
Definition at line 120 of file playerinfo.cpp.
References mData, and PlayerInfoBackend::mSkills.
Referenced by ActorManager::heal(), SpellManager::invoke(), EAthena::HomunculusRecv::processHomunculusSkillUp(), EAthena::SkillRecv::processPlayerSkills(), TmwAthena::SkillRecv::processPlayerSkills(), Ea::SkillRecv::processPlayerSkillUp(), EAthena::SkillRecv::processSkillAdd(), EAthena::SkillRecv::processSkillAdd2(), EAthena::SkillRecv::processSkillDelete(), EAthena::SkillRecv::processSkillUpdate(), EAthena::SkillRecv::processSkillUpdate2(), LocalPlayer::tryMagic(), and SkillInfo::update().
int PlayerInfo::getStatBase | ( | const AttributesT | id | ) |
Returns the base value of the given stat.
Definition at line 135 of file playerinfo.cpp.
References mData, and PlayerInfoBackend::mStats.
Referenced by ChangeDisplay::action(), Being::drawElementalSpriteAt(), Being::drawHomunculusSpriteAt(), Being::drawMercenarySpriteAt(), Ea::PlayerRecv::processPlayerStatUpdate4(), and AttrDisplay::update().
int PlayerInfo::getStatEffective | ( | const AttributesT | id | ) |
Returns the current effective value of the given stat. Effective is base
Definition at line 167 of file playerinfo.cpp.
References mData, and PlayerInfoBackend::mStats.
Referenced by Ea::PlayerHandler::canUseMagic().
const std::pair< int, int > PlayerInfo::getStatExperience | ( | const AttributesT | id | ) |
Returns the experience of the given stat.
Definition at line 175 of file playerinfo.cpp.
References mData, and PlayerInfoBackend::mStats.
Referenced by StatusWindow::updateProgressBar().
int PlayerInfo::getStatMod | ( | const AttributesT | id | ) |
Returns the modifier for the given stat.
Definition at line 151 of file playerinfo.cpp.
References mData, and PlayerInfoBackend::mStats.
Referenced by AttrDisplay::update().
Inventory * PlayerInfo::getStorageInventory | ( | ) |
Definition at line 200 of file playerinfo.cpp.
References Net::InventoryHandler::getStorage(), and inventoryHandler.
Referenced by Actions::getItemByInvIndex(), and ItemContainer::mouseReleased().
void PlayerInfo::init | ( | ) |
Initializes some internals.
Definition at line 434 of file playerinfo.cpp.
Referenced by Client::gameInit(), Dirs::initLocalDataDir(), and PRAGMA45().
bool PlayerInfo::isInRoom | ( | ) |
Definition at line 643 of file playerinfo.cpp.
References mRoomName.
Referenced by InputManager::updateConditionMask().
bool PlayerInfo::isItemProtected | ( | const int | id | ) |
Definition at line 515 of file playerinfo.cpp.
References mProtectedItems.
Referenced by InventoryWindow::action(), PopupMenu::addProtection(), ComplexInventory::addVirtualItem(), Inventory::addVirtualItem(), TradeWindow::checkItem(), ItemContainer::draw(), ShopListBox::draw(), DropShortcut::dropFirst(), DropShortcut::dropItem(), InventoryWindow::mouseClicked(), ItemContainer::mouseReleased(), ItemContainer::safeDraw(), BuyingStoreSellDialog::sellAction(), NpcSellDialog::sellAction(), ShopSellDialog::sellAction(), PopupMenu::showDropPopup(), PopupMenu::showItemPopup(), and PopupMenu::showPopup().
bool PlayerInfo::isTalking | ( | ) |
Definition at line 458 of file playerinfo.cpp.
References NpcDialog::isActive(), and InventoryWindow::isStorageActive().
Trading PlayerInfo::isTrading | ( | ) |
Returns true if the player is involved in a trade at the moment, false otherwise.
Definition at line 391 of file playerinfo.cpp.
References mTrading.
Referenced by ShopWindow::processRequest(), and Ea::TradeRecv::processTradeRequestContinue().
bool PlayerInfo::isVending | ( | ) |
Definition at line 663 of file playerinfo.cpp.
References mVending.
Referenced by InputManager::updateConditionMask().
void PlayerInfo::loadData | ( | ) |
Definition at line 445 of file playerinfo.cpp.
References Configuration::getStringValue(), mProtectedItems, serverConfig, and splitToIntSet().
Referenced by Client::stateConnectServer1().
Definition at line 366 of file playerinfo.cpp.
References ItemSoundEvent::PICKUP, Net::PlayerHandler::pickUp(), playerHandler, ItemSoundManager::playSfx(), and Sfx_true.
Referenced by LocalPlayer::pickUp().
void PlayerInfo::protectItem | ( | const int | id | ) |
Definition at line 503 of file playerinfo.cpp.
References mProtectedItems, and saveProtectedItems().
|
static |
Definition at line 484 of file playerinfo.cpp.
References mProtectedItems, serverConfig, Configuration::setValue(), Catch::toString(), and Configuration::write().
Referenced by protectItem(), and unprotectItem().
void PlayerInfo::setAttribute | ( | const AttributesT | id, |
const int64_t | value, | ||
const Notify | notify | ||
) |
Changes the value of the given attribute.
Definition at line 110 of file playerinfo.cpp.
References PlayerInfoBackend::mAttributes, mData, NotifyManager::notify(), Notify_true, and triggerAttr().
Referenced by ChangeDisplay::action(), StatusWindow::attributeChanged(), EAthena::InventoryRecv::processCartInfo(), EAthena::PlayerRecv::processPlayerHeal(), Ea::PlayerRecv::processPlayerStatUpdate4(), EAthena::PlayerRecv::processPlayerStatUpdate5(), TmwAthena::PlayerRecv::processPlayerStatUpdate5(), EAthena::PlayerHandler::setStat(), and TmwAthena::PlayerHandler::setStat().
void PlayerInfo::setBackend | ( | const PlayerInfoBackend & | backend | ) |
Changes the internal PlayerInfoBackend reference;
Definition at line 376 of file playerinfo.cpp.
References mData.
Referenced by EAthena::CharServerRecv::processCharMapInfo(), and TmwAthena::CharServerRecv::processCharMapInfo().
void PlayerInfo::setCharId | ( | const int | charId | ) |
Definition at line 381 of file playerinfo.cpp.
References mCharId.
Referenced by EAthena::CharServerRecv::processCharMapInfo(), and TmwAthena::CharServerRecv::processCharMapInfo().
void PlayerInfo::setElemental | ( | const BeingId | id | ) |
Definition at line 539 of file playerinfo.cpp.
References mElementalId.
Referenced by EAthena::ElementalRecv::processElementalInfo().
void PlayerInfo::setEquipmentBackend | ( | Equipment::Backend *const | backend | ) |
void PlayerInfo::setGuildPositionFlags | ( | const GuildPositionFlags::Type | pos | ) |
Definition at line 648 of file playerinfo.cpp.
References mGuildPositionFlags.
Referenced by EAthena::GuildRecv::processGuildPositionInfo().
void PlayerInfo::setHomunculus | ( | HomunculusInfo *const | info | ) |
Definition at line 586 of file playerinfo.cpp.
References Actions::info(), and mHomunculus.
Referenced by EAthena::HomunculusRecv::processHomunculusData().
void PlayerInfo::setHomunculusBeing | ( | Being *const | being | ) |
Definition at line 592 of file playerinfo.cpp.
References localPlayer, mHomunculus, HomunculusInfo::name, Being::setName(), and Being::setOwner().
Referenced by EAthena::HomunculusRecv::processHomunculusData(), EAthena::HomunculusRecv::processHomunculusInfo1(), EAthena::HomunculusRecv::processHomunculusInfo2(), and EAthena::HomunculusRecv::processHomunculusInfo3().
void PlayerInfo::setMercenary | ( | MercenaryInfo *const | info | ) |
Definition at line 520 of file playerinfo.cpp.
References Actions::info(), and mMercenary.
Referenced by EAthena::MercenaryRecv::handleMercenaryMessage(), and EAthena::MercenaryRecv::processMercenaryInfo().
void PlayerInfo::setMercenaryBeing | ( | Being *const | being | ) |
Definition at line 526 of file playerinfo.cpp.
References MercenaryInfo::level, localPlayer, mMercenary, MercenaryInfo::name, MercenaryInfo::range, Being::setAttackRange(), Being::setLevel(), Being::setName(), and Being::setOwner().
Referenced by EAthena::BeingRecv::createBeing2(), and EAthena::MercenaryRecv::processMercenaryInfo().
void PlayerInfo::setPet | ( | PetInfo *const | info | ) |
Definition at line 554 of file playerinfo.cpp.
References Actions::info(), and mPet.
Referenced by EAthena::PetRecv::processPetData(), and EAthena::PetHandler::returnToEgg().
void PlayerInfo::setPetBeing | ( | Being *const | being | ) |
Definition at line 560 of file playerinfo.cpp.
References BeingId_zero, ActorSprite::getId(), PetInfo::level, localPlayer, mPet, mPetBeingId, PetInfo::name, Being::setLevel(), Being::setName(), and Being::setOwner().
Referenced by EAthena::BeingRecv::createBeing2(), and EAthena::PetRecv::processPetData().
void PlayerInfo::setRoomName | ( | const std::string & | name | ) |
Definition at line 638 of file playerinfo.cpp.
References mRoomName.
Referenced by EAthena::ChatRecv::processChatRoomCreateAck(), EAthena::ChatRecv::processChatRoomJoinAck(), and EAthena::ChatRecv::processChatRoomLeave().
void PlayerInfo::setServerLanguage | ( | const int | lang | ) |
Definition at line 668 of file playerinfo.cpp.
References TranslationManager::loadDictionaryLang(), and mServerLanguage.
Referenced by EAthena::BeingRecv::processBeingAttrs().
void PlayerInfo::setSkillLevel | ( | const int | id, |
const int | value | ||
) |
Definition at line 128 of file playerinfo.cpp.
References mData, and PlayerInfoBackend::mSkills.
Referenced by SkillDialog::hideSkills(), EAthena::GuildRecv::processGuildSkillInfo(), EAthena::HomunculusRecv::processHomunculusSkills(), EAthena::HomunculusRecv::processHomunculusSkillUp(), EAthena::MercenaryRecv::processMercenarySkills(), EAthena::SkillRecv::processPlayerSkills(), TmwAthena::SkillRecv::processPlayerSkills(), Ea::SkillRecv::processPlayerSkillUp(), EAthena::SkillRecv::processSkillAdd(), EAthena::SkillRecv::processSkillAdd2(), EAthena::SkillRecv::processSkillDelete(), EAthena::SkillRecv::processSkillUpdate(), EAthena::SkillRecv::processSkillUpdate2(), SkillDialog::removeSkill(), and SkillDialog::updateQuest().
void PlayerInfo::setStatBase | ( | const AttributesT | id, |
const int | value, | ||
const Notify | notify | ||
) |
Changes the base value of the given stat.
Definition at line 143 of file playerinfo.cpp.
References mData, PlayerInfoBackend::mStats, NotifyManager::notify(), Notify_true, and triggerStat().
Referenced by ChangeDisplay::action(), LocalPlayer::LocalPlayer(), EAthena::CharServerRecv::processCharMapInfo(), EAthena::ElementalRecv::processElementalInfo(), EAthena::HomunculusRecv::processHomunculusInfo1(), EAthena::HomunculusRecv::processHomunculusInfo2(), EAthena::HomunculusRecv::processHomunculusInfo3(), EAthena::MercenaryRecv::processMercenaryInfo(), Ea::InventoryRecv::processPlayerAttackRange(), EAthena::PlayerRecv::processPlayerStatUpdate5(), TmwAthena::PlayerRecv::processPlayerStatUpdate5(), EAthena::PlayerHandler::setStat(), and TmwAthena::PlayerHandler::setStat().
void PlayerInfo::setStatMod | ( | const AttributesT | id, |
const int | value, | ||
const Notify | notify | ||
) |
Changes the modifier for the given stat.
Definition at line 159 of file playerinfo.cpp.
References mData, PlayerInfoBackend::mStats, NotifyManager::notify(), Notify_true, and triggerStat().
Referenced by LocalPlayer::LocalPlayer(), Ea::InventoryRecv::processPlayerAttackRange(), EAthena::PlayerRecv::processPlayerStatUpdate5(), TmwAthena::PlayerRecv::processPlayerStatUpdate5(), EAthena::PlayerHandler::setStat(), and TmwAthena::PlayerHandler::setStat().
void PlayerInfo::setTrading | ( | const Trading | trading | ) |
Sets whether the player is currently involved in trade or not.
Definition at line 396 of file playerinfo.cpp.
References mTrading.
Referenced by TradeWindow::action(), Ea::TradeRecv::processTradeCancel(), Ea::TradeRecv::processTradeComplete(), Ea::TradeRecv::processTradeRequestContinue(), Ea::TradeRecv::processTradeResponseContinue(), EAthena::TradeHandler::respond(), and TmwAthena::TradeHandler::respond().
void PlayerInfo::stateChange | ( | const StateT | state | ) |
Definition at line 470 of file playerinfo.cpp.
References InventoryType::Cart, DragDropSource::Equipment, Settings::fixedInventorySize, State::GAME, DragDropSource::Inventory, InventoryType::Inventory, mCartInventory, mEquipment, mInventory, and settings.
Referenced by Client::loadData().
void PlayerInfo::triggerAttr | ( | const AttributesT | id, |
const int64_t | old | ||
) |
Definition at line 78 of file playerinfo.cpp.
References AttributeListener::distributeEvent(), PlayerInfoBackend::mAttributes, and mData.
Referenced by setAttribute().
void PlayerInfo::triggerStat | ( | const AttributesT | id, |
const int | old1, | ||
const int | old2 | ||
) |
Definition at line 85 of file playerinfo.cpp.
References StatListener::distributeEvent().
Referenced by setStatBase(), and setStatMod().
Definition at line 246 of file playerinfo.cpp.
References inventoryHandler, ItemSoundManager::playSfx(), Sfx_true, ItemSoundEvent::UNEQUIP, and Net::InventoryHandler::unequipItem().
Referenced by EquipmentWindow::action(), LocalPlayer::imitateOutfit(), EquipmentWindow::mouseReleased(), ItemShortcut::unequipItem(), and OutfitWindow::unequipNotInOutfit().
void PlayerInfo::unprotectItem | ( | const int | id | ) |
Definition at line 509 of file playerinfo.cpp.
References mProtectedItems, and saveProtectedItems().
Definition at line 618 of file playerinfo.cpp.
References Net::HomunculusHandler::attack(), Net::MercenaryHandler::attack(), homunculusHandler, mercenaryHandler, mHomunculus, and mMercenary.
Referenced by LocalPlayer::attack().
void PlayerInfo::updateAttrs | ( | ) |
Definition at line 420 of file playerinfo.cpp.
References Attributes::HOMUN_ATK, Attributes::HOMUN_ATTACK_DELAY, Attributes::HOMUN_ATTACK_SPEED, Attributes::MERC_ATK, Attributes::MERC_ATTACK_DELAY, Attributes::MERC_ATTACK_SPEED, Attributes::PLAYER_ATK, Attributes::PLAYER_ATTACK_DELAY, Attributes::PLAYER_ATTACK_SPEED, and updateAttackStat.
Referenced by EAthena::HomunculusRecv::processHomunculusInfo1(), EAthena::HomunculusRecv::processHomunculusInfo2(), EAthena::HomunculusRecv::processHomunculusInfo3(), EAthena::MercenaryRecv::processMercenaryInfo(), EAthena::PlayerRecv::processPlayerStatUpdate5(), TmwAthena::PlayerRecv::processPlayerStatUpdate5(), EAthena::PlayerHandler::setStat(), and TmwAthena::PlayerHandler::setStat().
Definition at line 262 of file playerinfo.cpp.
References ItemType::Card, ItemSoundEvent::EQUIP, Net::InventoryHandler::equipItem(), Equipm_true, Equipped_true, Item::getId(), Item::getType(), inventoryHandler, Item::isEquipment(), Item::isEquipped(), mProtectedItems, ItemSoundManager::playSfx(), Sfx_true, ItemSoundEvent::UNEQUIP, Net::InventoryHandler::unequipItem(), ItemSoundEvent::USE, ItemSoundEvent::USECARD, Net::InventoryHandler::useCard(), and Net::InventoryHandler::useItem().
Referenced by InventoryWindow::action(), InventoryWindow::mouseClicked(), and ItemShortcut::useItem().
Definition at line 313 of file playerinfo.cpp.
References ItemSoundEvent::EQUIP, Net::InventoryHandler::equipItem(), Equipm_false, Equipped_true, Item::getId(), inventoryHandler, Item::isEquipment(), Item::isEquipped(), mProtectedItems, ItemSoundManager::playSfx(), Sfx_true, ItemSoundEvent::UNEQUIP, Net::InventoryHandler::unequipItem(), ItemSoundEvent::USE, and Net::InventoryHandler::useItem().
Referenced by InventoryWindow::action().
Definition at line 254 of file playerinfo.cpp.
References inventoryHandler, ItemSoundManager::playSfx(), Sfx_true, ItemSoundEvent::USE, and Net::InventoryHandler::useItem().
Inventory* PlayerInfo::mCartInventory = 0 |
Definition at line 60 of file playerinfo.cpp.
Referenced by gameDestroyed(), getCartInventory(), and stateChange().
int PlayerInfo::mCharId = 0 |
Definition at line 57 of file playerinfo.cpp.
Referenced by getCharId(), and setCharId().
PlayerInfoBackend PlayerInfo::mData |
Definition at line 56 of file playerinfo.cpp.
Referenced by clear(), getAttribute(), getAttribute64(), IntData::getData(), StringData::getData(), FloatData::getData(), BoolData::getData(), getSkillLevel(), getStatBase(), getStatEffective(), getStatExperience(), getStatMod(), setAttribute(), setBackend(), setSkillLevel(), setStatBase(), setStatMod(), and triggerAttr().
BeingId PlayerInfo::mElementalId = BeingId_zero |
Definition at line 68 of file playerinfo.cpp.
Referenced by getElementalId(), and setElemental().
Equipment* PlayerInfo::mEquipment = 0 |
Definition at line 65 of file playerinfo.cpp.
Referenced by clearInventory(), gameDestroyed(), getEquipment(), setEquipmentBackend(), and stateChange().
GuildPositionFlags::Type PlayerInfo::mGuildPositionFlags = GuildPositionFlags::None |
Definition at line 67 of file playerinfo.cpp.
Referenced by getGuildPositionFlags(), and setGuildPositionFlags().
HomunculusInfo* PlayerInfo::mHomunculus = 0 |
Definition at line 62 of file playerinfo.cpp.
Referenced by getHomunculus(), getHomunculusId(), setHomunculus(), setHomunculusBeing(), and updateAttackAi().
Inventory* PlayerInfo::mInventory = 0 |
Definition at line 59 of file playerinfo.cpp.
Referenced by clearInventory(), gameDestroyed(), getInventory(), and stateChange().
int PlayerInfo::mLevelProgress = 0 |
Definition at line 72 of file playerinfo.cpp.
MercenaryInfo* PlayerInfo::mMercenary = 0 |
Definition at line 61 of file playerinfo.cpp.
Referenced by deinit(), getMercenary(), getMercenaryId(), setMercenary(), setMercenaryBeing(), and updateAttackAi().
PetInfo* PlayerInfo::mPet = 0 |
Definition at line 63 of file playerinfo.cpp.
Referenced by getPet(), setPet(), and setPetBeing().
BeingId PlayerInfo::mPetBeingId = BeingId_zero |
Definition at line 66 of file playerinfo.cpp.
Referenced by clear(), deinit(), getPetBeingId(), and setPetBeing().
std::set<int> PlayerInfo::mProtectedItems |
Definition at line 74 of file playerinfo.cpp.
Referenced by dropItem(), isItemProtected(), loadData(), protectItem(), saveProtectedItems(), unprotectItem(), useEquipItem(), and useEquipItem2().
std::string PlayerInfo::mRoomName |
Definition at line 64 of file playerinfo.cpp.
Referenced by getRoomName(), isInRoom(), and setRoomName().
int PlayerInfo::mServerLanguage = -1 |
Definition at line 73 of file playerinfo.cpp.
Referenced by getServerLanguage(), and setServerLanguage().
Trading PlayerInfo::mTrading = Trading_false |
Definition at line 70 of file playerinfo.cpp.
Referenced by isTrading(), and setTrading().
bool PlayerInfo::mVending = false |
Definition at line 71 of file playerinfo.cpp.
Referenced by enableVending(), and isVending().