Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mattyx14 committed Nov 17, 2014
1 parent 32c8e52 commit c683914
Show file tree
Hide file tree
Showing 20 changed files with 44 additions and 109 deletions.
1 change: 0 additions & 1 deletion path_10x/config.lua
Expand Up @@ -160,7 +160,6 @@
useMounts = true
enableCooldowns = true
unmountPlayerInPz = true
tibiaClassicSlots = true
monsterSpawnWalkback = true
allowBlockSpawn = true

Expand Down
1 change: 0 additions & 1 deletion path_10x/sources/configmanager.cpp
Expand Up @@ -334,7 +334,6 @@ bool ConfigManager::load()
m_confNumber[DEFAULT_DEPOT_SIZE] = getGlobalNumber("defaultDepotSize", 2000);
m_confBool[USE_CAPACITY] = getGlobalBool("useCapacity", true);
m_confBool[DAEMONIZE] = getGlobalBool("daemonize", false);
m_confBool[TIBIA_SLOTS] = getGlobalBool("tibiaClassicSlots", true);
m_confBool[SKIP_ITEMS_VERSION] = getGlobalBool("skipItemsVersionCheck", false);
m_confBool[SILENT_LUA] = getGlobalBool("disableLuaErrors", false);
m_confNumber[MAIL_ATTEMPTS] = getGlobalNumber("mailMaxAttempts", 20);
Expand Down
1 change: 0 additions & 1 deletion path_10x/sources/configmanager.h
Expand Up @@ -321,7 +321,6 @@ class ConfigManager
MONSTER_SPAWN_WALKBACK,
USE_CAPACITY,
DAEMONIZE,
TIBIA_SLOTS,
SKIP_ITEMS_VERSION,
SILENT_LUA,
HOUSE_SKIP_INIT_RENT,
Expand Down
28 changes: 9 additions & 19 deletions path_10x/sources/player.cpp
Expand Up @@ -2914,15 +2914,10 @@ ReturnValue Player::__queryAdd(int32_t index, const Thing* thing, uint32_t count
case SLOT_RIGHT:
if(item->getSlotPosition() & SLOTP_RIGHT)
{
if(!g_config.getBool(ConfigManager::TIBIA_SLOTS))
{
if(!item->isWeapon() || (item->getWeaponType() != WEAPON_SHIELD && !item->isDualWield()))
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_LEFT] && inventory[SLOT_LEFT]->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_DROPTWOHANDEDITEM;
else
ret = RET_NOERROR;
}
if(!item->isWeapon() || (item->getWeaponType() != WEAPON_SHIELD && !item->isDualWield()))
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_LEFT] && inventory[SLOT_LEFT]->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_DROPTWOHANDEDITEM;
else if(item->getSlotPosition() & SLOTP_TWO_HAND)
{
if(inventory[SLOT_LEFT] && inventory[SLOT_LEFT] != item)
Expand Down Expand Up @@ -2955,15 +2950,10 @@ ReturnValue Player::__queryAdd(int32_t index, const Thing* thing, uint32_t count
case SLOT_LEFT:
if(item->getSlotPosition() & SLOTP_LEFT)
{
if(!g_config.getBool(ConfigManager::TIBIA_SLOTS))
{
if(!item->isWeapon() || item->getWeaponType() == WEAPON_SHIELD)
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_RIGHT] && item->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_BOTHHANDSNEEDTOBEFREE;
else
ret = RET_NOERROR;
}
if(!item->isWeapon() || item->getWeaponType() == WEAPON_SHIELD)
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_RIGHT] && item->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_BOTHHANDSNEEDTOBEFREE;
else if(item->getSlotPosition() & SLOTP_TWO_HAND)
{
if(inventory[SLOT_RIGHT] && inventory[SLOT_RIGHT] != item)
Expand Down Expand Up @@ -3006,7 +2996,7 @@ ReturnValue Player::__queryAdd(int32_t index, const Thing* thing, uint32_t count
ret = RET_NOERROR;
break;
case SLOT_AMMO:
if(item->getSlotPosition() & SLOTP_AMMO || g_config.getBool(ConfigManager::TIBIA_SLOTS))
if(item->getSlotPosition() & SLOTP_AMMO)
ret = RET_NOERROR;
break;
case SLOT_WHEREEVER:
Expand Down
1 change: 0 additions & 1 deletion path_7x/config.lua
Expand Up @@ -157,7 +157,6 @@
playerFollowExhaust = 2000

-- 8.7x + config
tibiaClassicSlots = true
monsterSpawnWalkback = true
allowBlockSpawn = true

Expand Down
1 change: 0 additions & 1 deletion path_7x/sources/configmanager.cpp
Expand Up @@ -313,7 +313,6 @@ bool ConfigManager::load()
m_confNumber[DEFAULT_DEPOT_SIZE] = getGlobalNumber("defaultDepotSize", 2000);
m_confBool[USE_CAPACITY] = getGlobalBool("useCapacity", true);
m_confBool[DAEMONIZE] = getGlobalBool("daemonize", false);
m_confBool[TIBIA_SLOTS] = getGlobalBool("tibiaClassicSlots", true);
m_confBool[SKIP_ITEMS_VERSION] = getGlobalBool("skipItemsVersionCheck", false);
m_confBool[SILENT_LUA] = getGlobalBool("disableLuaErrors", false);
m_confNumber[MAIL_ATTEMPTS] = getGlobalNumber("mailMaxAttempts", 20);
Expand Down
1 change: 0 additions & 1 deletion path_7x/sources/configmanager.h
Expand Up @@ -299,7 +299,6 @@ class ConfigManager
MONSTER_SPAWN_WALKBACK,
USE_CAPACITY,
DAEMONIZE,
TIBIA_SLOTS,
SKIP_ITEMS_VERSION,
SILENT_LUA,
HOUSE_SKIP_INIT_RENT,
Expand Down
28 changes: 9 additions & 19 deletions path_7x/sources/player.cpp
Expand Up @@ -2756,15 +2756,10 @@ ReturnValue Player::__queryAdd(int32_t index, const Thing* thing, uint32_t count
case SLOT_RIGHT:
if(item->getSlotPosition() & SLOTP_RIGHT)
{
if(!g_config.getBool(ConfigManager::TIBIA_SLOTS))
{
if(!item->isWeapon() || (item->getWeaponType() != WEAPON_SHIELD && !item->isDualWield()))
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_LEFT] && inventory[SLOT_LEFT]->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_DROPTWOHANDEDITEM;
else
ret = RET_NOERROR;
}
if(!item->isWeapon() || (item->getWeaponType() != WEAPON_SHIELD && !item->isDualWield()))
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_LEFT] && inventory[SLOT_LEFT]->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_DROPTWOHANDEDITEM;
else if(item->getSlotPosition() & SLOTP_TWO_HAND)
{
if(inventory[SLOT_LEFT] && inventory[SLOT_LEFT] != item)
Expand Down Expand Up @@ -2797,15 +2792,10 @@ ReturnValue Player::__queryAdd(int32_t index, const Thing* thing, uint32_t count
case SLOT_LEFT:
if(item->getSlotPosition() & SLOTP_LEFT)
{
if(!g_config.getBool(ConfigManager::TIBIA_SLOTS))
{
if(!item->isWeapon() || item->getWeaponType() == WEAPON_SHIELD)
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_RIGHT] && item->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_BOTHHANDSNEEDTOBEFREE;
else
ret = RET_NOERROR;
}
if(!item->isWeapon() || item->getWeaponType() == WEAPON_SHIELD)
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_RIGHT] && item->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_BOTHHANDSNEEDTOBEFREE;
else if(item->getSlotPosition() & SLOTP_TWO_HAND)
{
if(inventory[SLOT_RIGHT] && inventory[SLOT_RIGHT] != item)
Expand Down Expand Up @@ -2848,7 +2838,7 @@ ReturnValue Player::__queryAdd(int32_t index, const Thing* thing, uint32_t count
ret = RET_NOERROR;
break;
case SLOT_AMMO:
if(item->getSlotPosition() & SLOTP_AMMO || g_config.getBool(ConfigManager::TIBIA_SLOTS))
if(item->getSlotPosition() & SLOTP_AMMO)
ret = RET_NOERROR;
break;
case SLOT_WHEREEVER:
Expand Down
1 change: 0 additions & 1 deletion path_85x/config.lua
Expand Up @@ -159,7 +159,6 @@
playerFollowExhaust = 2000

-- 8.7x + config
tibiaClassicSlots = true
monsterSpawnWalkback = true
allowBlockSpawn = true

Expand Down
1 change: 0 additions & 1 deletion path_85x/sources/configmanager.cpp
Expand Up @@ -334,7 +334,6 @@ bool ConfigManager::load()
m_confNumber[DEFAULT_DEPOT_SIZE] = getGlobalNumber("defaultDepotSize", 2000);
m_confBool[USE_CAPACITY] = getGlobalBool("useCapacity", true);
m_confBool[DAEMONIZE] = getGlobalBool("daemonize", false);
m_confBool[TIBIA_SLOTS] = getGlobalBool("tibiaClassicSlots", true);
m_confBool[SKIP_ITEMS_VERSION] = getGlobalBool("skipItemsVersionCheck", false);
m_confBool[SILENT_LUA] = getGlobalBool("disableLuaErrors", false);
m_confNumber[MAIL_ATTEMPTS] = getGlobalNumber("mailMaxAttempts", 20);
Expand Down
1 change: 0 additions & 1 deletion path_85x/sources/configmanager.h
Expand Up @@ -318,7 +318,6 @@ class ConfigManager
MONSTER_SPAWN_WALKBACK,
USE_CAPACITY,
DAEMONIZE,
TIBIA_SLOTS,
SKIP_ITEMS_VERSION,
SILENT_LUA,
HOUSE_SKIP_INIT_RENT,
Expand Down
28 changes: 9 additions & 19 deletions path_85x/sources/player.cpp
Expand Up @@ -2899,15 +2899,10 @@ ReturnValue Player::__queryAdd(int32_t index, const Thing* thing, uint32_t count
case SLOT_RIGHT:
if(item->getSlotPosition() & SLOTP_RIGHT)
{
if(!g_config.getBool(ConfigManager::TIBIA_SLOTS))
{
if(!item->isWeapon() || (item->getWeaponType() != WEAPON_SHIELD && !item->isDualWield()))
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_LEFT] && inventory[SLOT_LEFT]->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_DROPTWOHANDEDITEM;
else
ret = RET_NOERROR;
}
if(!item->isWeapon() || (item->getWeaponType() != WEAPON_SHIELD && !item->isDualWield()))
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_LEFT] && inventory[SLOT_LEFT]->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_DROPTWOHANDEDITEM;
else if(item->getSlotPosition() & SLOTP_TWO_HAND)
{
if(inventory[SLOT_LEFT] && inventory[SLOT_LEFT] != item)
Expand Down Expand Up @@ -2940,15 +2935,10 @@ ReturnValue Player::__queryAdd(int32_t index, const Thing* thing, uint32_t count
case SLOT_LEFT:
if(item->getSlotPosition() & SLOTP_LEFT)
{
if(!g_config.getBool(ConfigManager::TIBIA_SLOTS))
{
if(!item->isWeapon() || item->getWeaponType() == WEAPON_SHIELD)
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_RIGHT] && item->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_BOTHHANDSNEEDTOBEFREE;
else
ret = RET_NOERROR;
}
if(!item->isWeapon() || item->getWeaponType() == WEAPON_SHIELD)
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_RIGHT] && item->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_BOTHHANDSNEEDTOBEFREE;
else if(item->getSlotPosition() & SLOTP_TWO_HAND)
{
if(inventory[SLOT_RIGHT] && inventory[SLOT_RIGHT] != item)
Expand Down Expand Up @@ -2991,7 +2981,7 @@ ReturnValue Player::__queryAdd(int32_t index, const Thing* thing, uint32_t count
ret = RET_NOERROR;
break;
case SLOT_AMMO:
if(item->getSlotPosition() & SLOTP_AMMO || g_config.getBool(ConfigManager::TIBIA_SLOTS))
if(item->getSlotPosition() & SLOTP_AMMO)
ret = RET_NOERROR;
break;
case SLOT_WHEREEVER:
Expand Down
1 change: 0 additions & 1 deletion path_86x/config.lua
Expand Up @@ -159,7 +159,6 @@
playerFollowExhaust = 2000

-- 8.7x + config
tibiaClassicSlots = true
monsterSpawnWalkback = true
allowBlockSpawn = true

Expand Down
1 change: 0 additions & 1 deletion path_86x/sources/configmanager.cpp
Expand Up @@ -334,7 +334,6 @@ bool ConfigManager::load()
m_confNumber[DEFAULT_DEPOT_SIZE] = getGlobalNumber("defaultDepotSize", 2000);
m_confBool[USE_CAPACITY] = getGlobalBool("useCapacity", true);
m_confBool[DAEMONIZE] = getGlobalBool("daemonize", false);
m_confBool[TIBIA_SLOTS] = getGlobalBool("tibiaClassicSlots", true);
m_confBool[SKIP_ITEMS_VERSION] = getGlobalBool("skipItemsVersionCheck", false);
m_confBool[SILENT_LUA] = getGlobalBool("disableLuaErrors", false);
m_confNumber[MAIL_ATTEMPTS] = getGlobalNumber("mailMaxAttempts", 20);
Expand Down
1 change: 0 additions & 1 deletion path_86x/sources/configmanager.h
Expand Up @@ -318,7 +318,6 @@ class ConfigManager
MONSTER_SPAWN_WALKBACK,
USE_CAPACITY,
DAEMONIZE,
TIBIA_SLOTS,
SKIP_ITEMS_VERSION,
SILENT_LUA,
HOUSE_SKIP_INIT_RENT,
Expand Down
28 changes: 9 additions & 19 deletions path_86x/sources/player.cpp
Expand Up @@ -2912,15 +2912,10 @@ ReturnValue Player::__queryAdd(int32_t index, const Thing* thing, uint32_t count
case SLOT_RIGHT:
if(item->getSlotPosition() & SLOTP_RIGHT)
{
if(!g_config.getBool(ConfigManager::TIBIA_SLOTS))
{
if(!item->isWeapon() || (item->getWeaponType() != WEAPON_SHIELD && !item->isDualWield()))
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_LEFT] && inventory[SLOT_LEFT]->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_DROPTWOHANDEDITEM;
else
ret = RET_NOERROR;
}
if(!item->isWeapon() || (item->getWeaponType() != WEAPON_SHIELD && !item->isDualWield()))
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_LEFT] && inventory[SLOT_LEFT]->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_DROPTWOHANDEDITEM;
else if(item->getSlotPosition() & SLOTP_TWO_HAND)
{
if(inventory[SLOT_LEFT] && inventory[SLOT_LEFT] != item)
Expand Down Expand Up @@ -2953,15 +2948,10 @@ ReturnValue Player::__queryAdd(int32_t index, const Thing* thing, uint32_t count
case SLOT_LEFT:
if(item->getSlotPosition() & SLOTP_LEFT)
{
if(!g_config.getBool(ConfigManager::TIBIA_SLOTS))
{
if(!item->isWeapon() || item->getWeaponType() == WEAPON_SHIELD)
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_RIGHT] && item->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_BOTHHANDSNEEDTOBEFREE;
else
ret = RET_NOERROR;
}
if(!item->isWeapon() || item->getWeaponType() == WEAPON_SHIELD)
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_RIGHT] && item->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_BOTHHANDSNEEDTOBEFREE;
else if(item->getSlotPosition() & SLOTP_TWO_HAND)
{
if(inventory[SLOT_RIGHT] && inventory[SLOT_RIGHT] != item)
Expand Down Expand Up @@ -3004,7 +2994,7 @@ ReturnValue Player::__queryAdd(int32_t index, const Thing* thing, uint32_t count
ret = RET_NOERROR;
break;
case SLOT_AMMO:
if(item->getSlotPosition() & SLOTP_AMMO || g_config.getBool(ConfigManager::TIBIA_SLOTS))
if(item->getSlotPosition() & SLOTP_AMMO)
ret = RET_NOERROR;
break;
case SLOT_WHEREEVER:
Expand Down
1 change: 0 additions & 1 deletion path_87x/config.lua
Expand Up @@ -160,7 +160,6 @@
useMounts = true
enableCooldowns = true
unmountPlayerInPz = true
tibiaClassicSlots = true
monsterSpawnWalkback = true
allowBlockSpawn = true

Expand Down
1 change: 0 additions & 1 deletion path_87x/sources/configmanager.cpp
Expand Up @@ -334,7 +334,6 @@ bool ConfigManager::load()
m_confNumber[DEFAULT_DEPOT_SIZE] = getGlobalNumber("defaultDepotSize", 2000);
m_confBool[USE_CAPACITY] = getGlobalBool("useCapacity", true);
m_confBool[DAEMONIZE] = getGlobalBool("daemonize", false);
m_confBool[TIBIA_SLOTS] = getGlobalBool("tibiaClassicSlots", true);
m_confBool[SKIP_ITEMS_VERSION] = getGlobalBool("skipItemsVersionCheck", false);
m_confBool[SILENT_LUA] = getGlobalBool("disableLuaErrors", false);
m_confNumber[MAIL_ATTEMPTS] = getGlobalNumber("mailMaxAttempts", 20);
Expand Down
1 change: 0 additions & 1 deletion path_87x/sources/configmanager.h
Expand Up @@ -318,7 +318,6 @@ class ConfigManager
MONSTER_SPAWN_WALKBACK,
USE_CAPACITY,
DAEMONIZE,
TIBIA_SLOTS,
SKIP_ITEMS_VERSION,
SILENT_LUA,
HOUSE_SKIP_INIT_RENT,
Expand Down
26 changes: 8 additions & 18 deletions path_87x/sources/player.cpp
Expand Up @@ -2903,15 +2903,10 @@ ReturnValue Player::__queryAdd(int32_t index, const Thing* thing, uint32_t count
case SLOT_RIGHT:
if(item->getSlotPosition() & SLOTP_RIGHT)
{
if(!g_config.getBool(ConfigManager::TIBIA_SLOTS))
{
if(!item->isWeapon() || (item->getWeaponType() != WEAPON_SHIELD && !item->isDualWield()))
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_LEFT] && inventory[SLOT_LEFT]->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_DROPTWOHANDEDITEM;
else
ret = RET_NOERROR;
}
if(!item->isWeapon() || (item->getWeaponType() != WEAPON_SHIELD && !item->isDualWield()))
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_LEFT] && inventory[SLOT_LEFT]->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_DROPTWOHANDEDITEM;
else if(item->getSlotPosition() & SLOTP_TWO_HAND)
{
if(inventory[SLOT_LEFT] && inventory[SLOT_LEFT] != item)
Expand Down Expand Up @@ -2944,15 +2939,10 @@ ReturnValue Player::__queryAdd(int32_t index, const Thing* thing, uint32_t count
case SLOT_LEFT:
if(item->getSlotPosition() & SLOTP_LEFT)
{
if(!g_config.getBool(ConfigManager::TIBIA_SLOTS))
{
if(!item->isWeapon() || item->getWeaponType() == WEAPON_SHIELD)
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_RIGHT] && item->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_BOTHHANDSNEEDTOBEFREE;
else
ret = RET_NOERROR;
}
if(!item->isWeapon() || item->getWeaponType() == WEAPON_SHIELD)
ret = RET_NOTPOSSIBLE;
else if(inventory[SLOT_RIGHT] && item->getSlotPosition() & SLOTP_TWO_HAND)
ret = RET_BOTHHANDSNEEDTOBEFREE;
else if(item->getSlotPosition() & SLOTP_TWO_HAND)
{
if(inventory[SLOT_RIGHT] && inventory[SLOT_RIGHT] != item)
Expand Down

0 comments on commit c683914

Please sign in to comment.