From 6b6963c66d7c864c7dd0abe0162cce7848055d48 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Mon, 17 Aug 2009 03:17:14 +0200 Subject: [PATCH] * Change CONFIG_OFFHAND_CHECK_AT_TALENTS_RESET to CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN, and change behaviour related to the value. Note: Update your configuration file. --HG-- branch : trunk --- src/game/Player.cpp | 10 ++++------ src/game/World.cpp | 2 +- src/game/World.h | 2 +- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index f555404b77..8c0843385d 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -3561,12 +3561,11 @@ void Player::removeSpell(uint32 spell_id, bool disabled, bool learn_low_rank) } if(spell_id == 46917 && m_canTitanGrip) - { SetCanTitanGrip(false); - if(sWorld.getConfig(CONFIG_OFFHAND_CHECK_AT_TALENTS_RESET)) - AutoUnequipOffhandIfNeed(); - } - + + if(sWorld.getConfig(CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN)) + AutoUnequipOffhandIfNeed(); + // remove from spell book if not replaced by lesser rank if(!prev_activate) { @@ -21867,7 +21866,6 @@ void Player::ActivateSpec(uint8 spec) _LoadActions(result, false); } UnsummonPetTemporaryIfAny(); - AutoUnequipOffhandIfNeed(); SendActionButtons(1); SetPower(getPowerType(), 0); } diff --git a/src/game/World.cpp b/src/game/World.cpp index a5e6a66f49..0be652c568 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -1015,7 +1015,7 @@ void World::LoadConfigSettings(bool reload) m_configs[CONFIG_ARENA_SEASON_ID] = sConfig.GetIntDefault ("Arena.ArenaSeason.ID", 1); m_configs[CONFIG_ARENA_SEASON_IN_PROGRESS] = sConfig.GetBoolDefault("Arena.ArenaSeason.InProgress", true); - m_configs[CONFIG_OFFHAND_CHECK_AT_TALENTS_RESET] = sConfig.GetBoolDefault("OffhandCheckAtTalentsReset", false); + m_configs[CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN] = sConfig.GetBoolDefault("OffhandCheckAtSpellUnlearn", false); if(int clientCacheId = sConfig.GetIntDefault("ClientCacheVersion", 0)) { diff --git a/src/game/World.h b/src/game/World.h index bfc2947201..5e16d973f7 100644 --- a/src/game/World.h +++ b/src/game/World.h @@ -244,7 +244,7 @@ enum WorldConfigs CONFIG_ENABLE_SINFO_LOGIN, CONFIG_PET_LOS, CONFIG_NUMTHREADS, - CONFIG_OFFHAND_CHECK_AT_TALENTS_RESET, + CONFIG_OFFHAND_CHECK_AT_SPELL_UNLEARN, CONFIG_CHATLOG_CHANNEL, CONFIG_CHATLOG_WHISPER, CONFIG_CHATLOG_SYSCHAN,