mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Merge fix
This commit is contained in:
+3
-2
@@ -49,7 +49,7 @@ namespace EQEmu
|
||||
};
|
||||
|
||||
enum DeityTypeBit : uint32 {
|
||||
bit_DeityAll = 0x00000000,
|
||||
bit_DeityNone = 0x00000000,
|
||||
bit_DeityAgnostic = 0x00000001,
|
||||
bit_DeityBertoxxulous = 0x00000002,
|
||||
bit_DeityBrellSirilis = 0x00000004,
|
||||
@@ -66,7 +66,8 @@ namespace EQEmu
|
||||
bit_DeitySolusekRo = 0x00002000,
|
||||
bit_DeityTheTribunal = 0x00004000,
|
||||
bit_DeityTunare = 0x00008000,
|
||||
bit_DeityVeeshan = 0x00010000
|
||||
bit_DeityVeeshan = 0x00010000,
|
||||
bit_DeityAll = 0xFFFFFFFF
|
||||
};
|
||||
|
||||
extern DeityTypeBit ConvertDeityTypeToDeityTypeBit(DeityType deity_type);
|
||||
|
||||
@@ -105,6 +105,15 @@ void EQEmuLogSys::LoadLogSettingsDefaults()
|
||||
log_settings[Logs::Login_Server].log_to_console = Logs::General;
|
||||
log_settings[Logs::Headless_Client].log_to_console = Logs::General;
|
||||
|
||||
/* Set Category enabled status on defaults */
|
||||
log_settings[Logs::World_Server].is_category_enabled = 1;
|
||||
log_settings[Logs::Zone_Server].is_category_enabled = 1;
|
||||
log_settings[Logs::QS_Server].is_category_enabled = 1;
|
||||
log_settings[Logs::UCS_Server].is_category_enabled = 1;
|
||||
log_settings[Logs::Crash].is_category_enabled = 1;
|
||||
log_settings[Logs::MySQLError].is_category_enabled = 1;
|
||||
log_settings[Logs::Login_Server].is_category_enabled = 1;
|
||||
|
||||
/* Declare process file names for log writing
|
||||
If there is no process_file_name declared, no log file will be written, simply
|
||||
*/
|
||||
|
||||
@@ -111,9 +111,6 @@ Zone extensions and features
|
||||
//path to where sql logs should be placed
|
||||
#define SQL_LOG_PATH "sql_logs/"
|
||||
|
||||
//New aggro system to reduce overhead.
|
||||
#define REVERSE_AGGRO
|
||||
|
||||
//The highest you can #setskill / #setallskill
|
||||
#define HIGHEST_CAN_SET_SKILL 400
|
||||
|
||||
|
||||
@@ -241,48 +241,70 @@ EQEmu::ItemInstance* EQEmu::InventoryProfile::GetCursorItem()
|
||||
}
|
||||
|
||||
// Swap items in inventory
|
||||
bool EQEmu::InventoryProfile::SwapItem(int16 slot_a, int16 slot_b, uint16 race_id, uint8 class_id, uint16 deity_id, uint8 level)
|
||||
bool EQEmu::InventoryProfile::SwapItem(int16 slot_a, int16 slot_b, SwapItemFailState& fail_state, uint16 race_id, uint8 class_id, uint16 deity_id, uint8 level)
|
||||
{
|
||||
fail_state = swapInvalid;
|
||||
|
||||
// Temp holding areas for a and b
|
||||
ItemInstance* inst_a = GetItem(slot_a);
|
||||
ItemInstance* inst_b = GetItem(slot_b);
|
||||
|
||||
if (inst_a) {
|
||||
if (!inst_a->IsSlotAllowed(slot_b))
|
||||
if (!inst_a->IsSlotAllowed(slot_b)) {
|
||||
fail_state = swapNotAllowed;
|
||||
return false;
|
||||
|
||||
}
|
||||
if ((slot_b >= legacy::EQUIPMENT_BEGIN && slot_b <= legacy::EQUIPMENT_END) || slot_b == inventory::slotPowerSource) {
|
||||
auto item_a = inst_a->GetItem();
|
||||
if (!item_a)
|
||||
if (!item_a) {
|
||||
fail_state = swapNullData;
|
||||
return false;
|
||||
if (race_id && class_id && !item_a->IsEquipable(race_id, class_id))
|
||||
}
|
||||
if (race_id && class_id && !item_a->IsEquipable(race_id, class_id)) {
|
||||
fail_state = swapRaceClass;
|
||||
return false;
|
||||
if (deity_id && item_a->Deity && !(deity::ConvertDeityTypeToDeityTypeBit((deity::DeityType)deity_id) & item_a->Deity))
|
||||
}
|
||||
if (deity_id && item_a->Deity && !(deity::ConvertDeityTypeToDeityTypeBit((deity::DeityType)deity_id) & item_a->Deity)) {
|
||||
fail_state = swapDeity;
|
||||
return false;
|
||||
if (level && item_a->ReqLevel && level < item_a->ReqLevel)
|
||||
}
|
||||
if (level && item_a->ReqLevel && level < item_a->ReqLevel) {
|
||||
fail_state = swapLevel;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (inst_b) {
|
||||
if (!inst_b->IsSlotAllowed(slot_a))
|
||||
if (!inst_b->IsSlotAllowed(slot_a)) {
|
||||
fail_state = swapNotAllowed;
|
||||
return false;
|
||||
|
||||
}
|
||||
if ((slot_a >= legacy::EQUIPMENT_BEGIN && slot_a <= legacy::EQUIPMENT_END) || slot_a == inventory::slotPowerSource) {
|
||||
auto item_b = inst_b->GetItem();
|
||||
if (!item_b)
|
||||
if (!item_b) {
|
||||
fail_state = swapNullData;
|
||||
return false;
|
||||
if (race_id && class_id && !item_b->IsEquipable(race_id, class_id))
|
||||
}
|
||||
if (race_id && class_id && !item_b->IsEquipable(race_id, class_id)) {
|
||||
fail_state = swapRaceClass;
|
||||
return false;
|
||||
if (deity_id && item_b->Deity && !(deity::ConvertDeityTypeToDeityTypeBit((deity::DeityType)deity_id) & item_b->Deity))
|
||||
}
|
||||
if (deity_id && item_b->Deity && !(deity::ConvertDeityTypeToDeityTypeBit((deity::DeityType)deity_id) & item_b->Deity)) {
|
||||
fail_state = swapDeity;
|
||||
return false;
|
||||
if (level && item_b->ReqLevel && level < item_b->ReqLevel)
|
||||
}
|
||||
if (level && item_b->ReqLevel && level < item_b->ReqLevel) {
|
||||
fail_state = swapLevel;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_PutItem(slot_a, inst_b); // Copy b->a
|
||||
_PutItem(slot_b, inst_a); // Copy a->b
|
||||
_PutItem(slot_a, inst_b); // Assign b->a
|
||||
_PutItem(slot_b, inst_a); // Assign a->b
|
||||
|
||||
fail_state = swapPass;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -85,15 +85,22 @@ namespace EQEmu
|
||||
// Public Methods
|
||||
///////////////////////////////
|
||||
|
||||
InventoryProfile() { m_mob_version = versions::MobVersion::Unknown; m_mob_version_set = false; }
|
||||
InventoryProfile() {
|
||||
m_mob_version = versions::MobVersion::Unknown;
|
||||
m_mob_version_set = false;
|
||||
m_lookup = inventory::Lookup(versions::MobVersion::Unknown);
|
||||
}
|
||||
~InventoryProfile();
|
||||
|
||||
bool SetInventoryVersion(versions::MobVersion inventory_version) {
|
||||
if (!m_mob_version_set) {
|
||||
m_mob_version = versions::ValidateMobVersion(inventory_version);
|
||||
return (m_mob_version_set = true);
|
||||
m_lookup = inventory::Lookup(m_mob_version);
|
||||
m_mob_version_set = true;
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
m_lookup = inventory::Lookup(versions::MobVersion::Unknown);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -127,7 +134,8 @@ namespace EQEmu
|
||||
ItemInstance* GetCursorItem();
|
||||
|
||||
// Swap items in inventory
|
||||
bool SwapItem(int16 slot_a, int16 slot_b, uint16 race_id = 0, uint8 class_id = 0, uint16 deity_id = 0, uint8 level = 0);
|
||||
enum SwapItemFailState : int8 { swapInvalid = -1, swapPass = 0, swapNotAllowed, swapNullData, swapRaceClass, swapDeity, swapLevel };
|
||||
bool SwapItem(int16 slot_a, int16 slot_b, SwapItemFailState& fail_state, uint16 race_id = 0, uint8 class_id = 0, uint16 deity_id = 0, uint8 level = 0);
|
||||
|
||||
// Remove item from inventory
|
||||
bool DeleteItem(int16 slot_id, uint8 quantity = 0);
|
||||
@@ -224,6 +232,7 @@ namespace EQEmu
|
||||
// Active mob version
|
||||
versions::MobVersion m_mob_version;
|
||||
bool m_mob_version_set;
|
||||
const inventory::LookupEntry* m_lookup;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -22,7 +22,8 @@
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
enum { //values for pTimerType
|
||||
enum : int { //values for pTimerType
|
||||
pTimerNegativeItemReuse = -1, // these grow down basically, we will have item ID * -1 for the timer ID
|
||||
pTimerStartAdventureTimer = 1,
|
||||
pTimerSurnameChange = 2,
|
||||
pTimerFeignDeath = 3,
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@
|
||||
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||
*/
|
||||
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9107
|
||||
#define CURRENT_BINARY_DATABASE_VERSION 9110
|
||||
#ifdef BOTS
|
||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9017
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user