Changeset 272 for trunk/src/game/Player.h
- Timestamp:
- 11/22/08 00:35:41 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Player.h
r268 r272 11 11 * This program is distributed in the hope that it will be useful, 12 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 14 * GNU General Public License for more details. 15 15 * 16 16 * You should have received a copy of the GNU General Public License 17 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 … … 34 34 #include "WorldSession.h" 35 35 #include "Pet.h" 36 #include "MapReference.h"37 36 #include "Util.h" // for Tokens typedef 38 37 … … 781 780 782 781 /// Type of environmental damages 783 enum Enviro mentalDamage782 enum EnvironmentalDamageType 784 783 { 785 784 DAMAGE_EXHAUSTED = 0, … … 898 897 void AddToWorld(); 899 898 void RemoveFromWorld(); 899 // always active 900 void setActive(bool) {} 900 901 901 902 void SetViewport(uint64 guid, bool movable); … … 1124 1125 uint32 GetArmorProficiency() const { return m_ArmorProficiency; } 1125 1126 bool IsInFeralForm() const { return m_form == FORM_CAT || m_form == FORM_BEAR || m_form == FORM_DIREBEAR; } 1126 bool IsUseEquip edWeapon( bool mainhand ) const1127 bool IsUseEquippedWeapon( bool mainhand ) const 1127 1128 { 1128 1129 // disarm applied only to mainhand weapon … … 1306 1307 SetMoney (GetMoney() > uint32(-d) ? GetMoney() + d : 0); 1307 1308 else 1308 SetMoney (GetMoney() < uint32(MAX_MONEY_AMOUNT - d)? GetMoney() + d : MAX_MONEY_AMOUNT);1309 SetMoney (GetMoney() < MAX_MONEY_AMOUNT - d ? GetMoney() + d : MAX_MONEY_AMOUNT); 1309 1310 1310 1311 // "At Gold Limit" … … 1428 1429 PlayerSpellMap const& GetSpellMap() const { return m_spells; } 1429 1430 PlayerSpellMap & GetSpellMap() { return m_spells; } 1431 ActionButtonList const& GetActionButtonList() const { return m_actionButtons; } 1430 1432 1431 1433 void AddSpellMod(SpellModifier* mod, bool apply); … … 1517 1519 void SendUpdateToOutOfRangeGroupMembers(); 1518 1520 1519 void SetInGuild(uint32 GuildId) { SetUInt32Value(PLAYER_GUILDID, GuildId); Player::SetUInt32ValueInDB(PLAYER_GUILDID, GuildId, GetGUID()); }1520 void SetRank(uint32 rankId){ SetUInt32Value(PLAYER_GUILDRANK, rankId); Player::SetUInt32ValueInDB(PLAYER_GUILDRANK, rankId, GetGUID()); }1521 void SetInGuild(uint32 GuildId) { SetUInt32Value(PLAYER_GUILDID, GuildId); Player::SetUInt32ValueInDB(PLAYER_GUILDID, GuildId, this->GetGUID()); } 1522 void SetRank(uint32 rankId){ SetUInt32Value(PLAYER_GUILDRANK, rankId); Player::SetUInt32ValueInDB(PLAYER_GUILDRANK, rankId, this->GetGUID()); } 1521 1523 void SetGuildIdInvited(uint32 GuildId) { m_GuildIdInvited = GuildId; } 1522 1524 uint32 GetGuildId() { return GetUInt32Value(PLAYER_GUILDID); } … … 1531 1533 { 1532 1534 SetUInt32Value(PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + (slot * 6), ArenaTeamId); 1533 SetUInt32ValueInDB(PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + (slot * 6), ArenaTeamId, GetGUID());1535 SetUInt32ValueInDB(PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + (slot * 6), ArenaTeamId, this->GetGUID()); 1534 1536 } 1535 1537 uint32 GetArenaTeamId(uint8 slot) { return GetUInt32Value(PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + (slot * 6)); } … … 1607 1609 void SendLogXPGain(uint32 GivenXP,Unit* victim,uint32 RestXP); 1608 1610 1609 1611 //Low Level Packets 1610 1612 void PlaySound(uint32 Sound, bool OnlySelf); 1611 1613 //notifiers … … 1639 1641 void KillPlayer(); 1640 1642 uint32 GetResurrectionSpellId(); 1641 void ResurrectPlayer(float restore_percent, bool applySickness = false);1643 void ResurrectPlayer(float restore_percent, bool updateToWorld = true, bool applySickness = false); 1642 1644 void BuildPlayerRepop(); 1643 1645 void RepopAtGraveyard(); … … 1761 1763 void SetRegularAttackTime(); 1762 1764 void SetBaseModValue(BaseModGroup modGroup, BaseModType modType, float value) { m_auraBaseMod[modGroup][modType] = value; } 1763 void HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, float amount, bool apply );1765 void HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, float amount, bool apply, bool affectStats = true); 1764 1766 float GetBaseModValue(BaseModGroup modGroup, BaseModType modType) const; 1765 1767 float GetTotalBaseModValue(BaseModGroup modGroup) const; … … 1768 1770 void _RemoveAllStatBonuses(); 1769 1771 1770 void _ApplyWeaponDependentAuraMods(Item *item, WeaponAttackType attackType,bool apply);1772 void _ApplyWeaponDependentAuraMods(Item *item,WeaponAttackType attackType,bool apply); 1771 1773 void _ApplyWeaponDependentAuraCritMod(Item *item, WeaponAttackType attackType, Aura* aura, bool apply); 1772 1774 void _ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType attackType, Aura* aura, bool apply); … … 1933 1935 1934 1936 /*********************************************************/ 1935 /*** ENVIRO MENTAL SYSTEM ***/1936 /*********************************************************/ 1937 1938 void EnvironmentalDamage(uint64 guid, Enviro mentalDamage type, uint32 damage);1937 /*** ENVIRONMENTAL SYSTEM ***/ 1938 /*********************************************************/ 1939 1940 void EnvironmentalDamage(uint64 guid, EnvironmentalDamageType type, uint32 damage); 1939 1941 1940 1942 /*********************************************************/ … … 2061 2063 2062 2064 GridReference<Player> &GetGridRef() { return m_gridRef; } 2063 MapReference &GetMapRef() { return m_mapRef; }2064 2065 2065 bool isAllowedToLoot(Creature* creature); 2066 2066 … … 2308 2308 2309 2309 GridReference<Player> m_gridRef; 2310 MapReference m_mapRef;2311 2310 }; 2312 2311