Changeset 279 for trunk/src/game/Player.h
- Timestamp:
- 11/22/08 00:36:22 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Player.h
r272 r279 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. See the13 * 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" 36 37 #include "Util.h" // for Tokens typedef 37 38 … … 780 781 781 782 /// Type of environmental damages 782 enum Enviro nmentalDamageType783 enum EnviromentalDamage 783 784 { 784 785 DAMAGE_EXHAUSTED = 0, … … 1125 1126 uint32 GetArmorProficiency() const { return m_ArmorProficiency; } 1126 1127 bool IsInFeralForm() const { return m_form == FORM_CAT || m_form == FORM_BEAR || m_form == FORM_DIREBEAR; } 1127 bool IsUseEquip pedWeapon( bool mainhand ) const1128 bool IsUseEquipedWeapon( bool mainhand ) const 1128 1129 { 1129 1130 // disarm applied only to mainhand weapon … … 1307 1308 SetMoney (GetMoney() > uint32(-d) ? GetMoney() + d : 0); 1308 1309 else 1309 SetMoney (GetMoney() < MAX_MONEY_AMOUNT - d? GetMoney() + d : MAX_MONEY_AMOUNT);1310 SetMoney (GetMoney() < uint32(MAX_MONEY_AMOUNT - d) ? GetMoney() + d : MAX_MONEY_AMOUNT); 1310 1311 1311 1312 // "At Gold Limit" … … 1429 1430 PlayerSpellMap const& GetSpellMap() const { return m_spells; } 1430 1431 PlayerSpellMap & GetSpellMap() { return m_spells; } 1431 ActionButtonList const& GetActionButtonList() const { return m_actionButtons; }1432 1432 1433 1433 void AddSpellMod(SpellModifier* mod, bool apply); … … 1519 1519 void SendUpdateToOutOfRangeGroupMembers(); 1520 1520 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 void SetInGuild(uint32 GuildId) { SetUInt32Value(PLAYER_GUILDID, GuildId); Player::SetUInt32ValueInDB(PLAYER_GUILDID, GuildId, GetGUID()); } 1522 void SetRank(uint32 rankId){ SetUInt32Value(PLAYER_GUILDRANK, rankId); Player::SetUInt32ValueInDB(PLAYER_GUILDRANK, rankId, GetGUID()); } 1523 1523 void SetGuildIdInvited(uint32 GuildId) { m_GuildIdInvited = GuildId; } 1524 1524 uint32 GetGuildId() { return GetUInt32Value(PLAYER_GUILDID); } … … 1533 1533 { 1534 1534 SetUInt32Value(PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + (slot * 6), ArenaTeamId); 1535 SetUInt32ValueInDB(PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + (slot * 6), ArenaTeamId, this->GetGUID());1535 SetUInt32ValueInDB(PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + (slot * 6), ArenaTeamId, GetGUID()); 1536 1536 } 1537 1537 uint32 GetArenaTeamId(uint8 slot) { return GetUInt32Value(PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + (slot * 6)); } … … 1609 1609 void SendLogXPGain(uint32 GivenXP,Unit* victim,uint32 RestXP); 1610 1610 1611 1611 //Low Level Packets 1612 1612 void PlaySound(uint32 Sound, bool OnlySelf); 1613 1613 //notifiers … … 1641 1641 void KillPlayer(); 1642 1642 uint32 GetResurrectionSpellId(); 1643 void ResurrectPlayer(float restore_percent, bool updateToWorld = true, boolapplySickness = false);1643 void ResurrectPlayer(float restore_percent, bool applySickness = false); 1644 1644 void BuildPlayerRepop(); 1645 1645 void RepopAtGraveyard(); … … 1763 1763 void SetRegularAttackTime(); 1764 1764 void SetBaseModValue(BaseModGroup modGroup, BaseModType modType, float value) { m_auraBaseMod[modGroup][modType] = value; } 1765 void HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, float amount, bool apply , bool affectStats = true);1765 void HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, float amount, bool apply); 1766 1766 float GetBaseModValue(BaseModGroup modGroup, BaseModType modType) const; 1767 1767 float GetTotalBaseModValue(BaseModGroup modGroup) const; … … 1770 1770 void _RemoveAllStatBonuses(); 1771 1771 1772 void _ApplyWeaponDependentAuraMods(Item *item, WeaponAttackType attackType,bool apply);1772 void _ApplyWeaponDependentAuraMods(Item *item, WeaponAttackType attackType, bool apply); 1773 1773 void _ApplyWeaponDependentAuraCritMod(Item *item, WeaponAttackType attackType, Aura* aura, bool apply); 1774 1774 void _ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType attackType, Aura* aura, bool apply); … … 1935 1935 1936 1936 /*********************************************************/ 1937 /*** ENVIRO NMENTAL SYSTEM ***/1938 /*********************************************************/ 1939 1940 void EnvironmentalDamage(uint64 guid, Enviro nmentalDamageType type, uint32 damage);1937 /*** ENVIROMENTAL SYSTEM ***/ 1938 /*********************************************************/ 1939 1940 void EnvironmentalDamage(uint64 guid, EnviromentalDamage type, uint32 damage); 1941 1941 1942 1942 /*********************************************************/ … … 2063 2063 2064 2064 GridReference<Player> &GetGridRef() { return m_gridRef; } 2065 MapReference &GetMapRef() { return m_mapRef; } 2066 2065 2067 bool isAllowedToLoot(Creature* creature); 2066 2068 … … 2308 2310 2309 2311 GridReference<Player> m_gridRef; 2312 MapReference m_mapRef; 2310 2313 }; 2311 2314