Merge branch 'master' of https://github.com/EQEmu/Server into clientupdate

Conflicts:
	changelog.txt
This commit is contained in:
Uleat 2014-08-16 18:17:59 -04:00
commit 00321126f1
15 changed files with 1534 additions and 2102 deletions

View File

@ -1,10 +1,10 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
== 08/16/2014 ==
KLS: (addmoreice) Trying out some unstable DB changes. Do backup your database before trying them as master will be considered unstable for a few days at least.
Uleat (Noudness): Fixed a floating-point comparison error that led to the notorious 'client bounce' (this is not related to the
'mob falling' due to not having maps installed.) This fix also eliminates a sizeable amount of unnecessary out-going packets due
to invalid orientation corrections.
Note: This patch is probably of significant enough importance that admins may wish to manually apply this to older server builds.
The number of packets reduced per second should be approximately (num_stationary_close_clients * (num_close_clients - 1)). This will
likely have the most effect in zones like: Nexus, Bazaar, Guilds (Halls) and RAID INSTANCES - where players don't move around a lot.

View File

@ -175,14 +175,14 @@ void ImportSkillCaps(SharedDatabase *db) {
continue;
}
std::string sql;
int class_id, skill_id, level, cap;
class_id = atoi(split[0].c_str());
skill_id = atoi(split[1].c_str());
level = atoi(split[2].c_str());
cap = atoi(split[3].c_str());
StringFormat(sql, "INSERT INTO skill_caps(class, skillID, level, cap) VALUES(%d, %d, %d, %d)",
std::string sql = StringFormat("INSERT INTO skill_caps(class, skillID, level, cap) VALUES(%d, %d, %d, %d)",
class_id, skill_id, level, cap);
db->RunQuery(sql.c_str(), (uint32)sql.length());
@ -226,7 +226,7 @@ void ImportBaseData(SharedDatabase *db) {
mana_fac = atof(split[8].c_str());
end_fac = atof(split[9].c_str());
StringFormat(sql, "INSERT INTO base_data(level, class, hp, mana, end, unk1, unk2, hp_fac, "
sql = StringFormat("INSERT INTO base_data(level, class, hp, mana, end, unk1, unk2, hp_fac, "
"mana_fac, end_fac) VALUES(%d, %d, %f, %f, %f, %f, %f, %f, %f, %f)",
level, class_id, hp, mana, end, unk1, unk2, hp_fac, mana_fac, end_fac);

View File

@ -916,8 +916,7 @@ void Inventory::dumpItemCollection(const std::map<int16, ItemInst*> &collection)
if (!inst || !inst->GetItem())
continue;
std::string slot;
StringFormat(slot, "Slot %d: %s (%d)", it->first, it->second->GetItem()->Name, (inst->GetCharges() <= 0) ? 1 : inst->GetCharges());
std::string slot = StringFormat("Slot %d: %s (%d)", it->first, it->second->GetItem()->Name, (inst->GetCharges() <= 0) ? 1 : inst->GetCharges());
std::cout << slot << std::endl;
dumpBagContents(inst, &it);
@ -936,8 +935,7 @@ void Inventory::dumpBagContents(ItemInst *inst, iter_inst *it) {
if (!baginst || !baginst->GetItem())
continue;
std::string subSlot;
StringFormat(subSlot, " Slot %d: %s (%d)", Inventory::CalcSlotId((*it)->first, itb->first),
std::string subSlot = StringFormat(" Slot %d: %s (%d)", Inventory::CalcSlotId((*it)->first, itb->first),
baginst->GetItem()->Name, (baginst->GetCharges() <= 0) ? 1 : baginst->GetCharges());
std::cout << subSlot << std::endl;
}

View File

@ -10,35 +10,24 @@ MySQLRequestResult::MySQLRequestResult()
MySQLRequestResult::MySQLRequestResult(MYSQL_RES* result, uint32 rowsAffected, uint32 rowCount, uint32 columnCount, uint32 lastInsertedID, uint32 errorNumber, char *errorBuffer)
: m_CurrentRow(result), m_OneBeyondRow()
{
if (errorBuffer != nullptr)
m_Success = false;
else if (errorBuffer == nullptr && result == nullptr)
{
m_Success = false;
#ifdef _EQDEBUG
std::cout << "DB Query Error: No Result" << std::endl;
#endif
m_ErrorNumber = UINT_MAX;
m_ErrorBuffer = new char[MYSQL_ERRMSG_SIZE];
strcpy(m_ErrorBuffer, "DBcore::RunQuery: No Result");
}
else
m_Success = true;
m_Result = result;
m_ErrorBuffer = errorBuffer;
m_Result = result;
m_RowsAffected = rowsAffected;
m_RowCount = rowCount;
m_ColumnCount = columnCount;
// If we actually need the column length / fields it will be
// requested at that time, no need to pull it in just to cache it.
// Normal usage would have it as nullptr most likely anyways.
m_ColumnLengths = nullptr;
m_Fields = nullptr;
m_LastInsertedID = lastInsertedID;
m_ErrorNumber = errorNumber;
// If we actually need the column length / fields it will be
// requested at that time, no need to pull it in just to cache it.
// Normal usage would have it as nullptr most likely anyways.
m_ColumnLengths = nullptr;
m_Fields = nullptr;
if (errorBuffer != nullptr)
m_Success = false;
m_Success = true;
m_ErrorNumber = errorNumber;
m_ErrorBuffer = errorBuffer;
}
void MySQLRequestResult::FreeInternals()
@ -113,7 +102,7 @@ MySQLRequestResult::MySQLRequestResult(MySQLRequestResult&& moveItem)
m_ColumnLengths = moveItem.m_ColumnLengths;
m_Fields = moveItem.m_Fields;
// Keeps deconstructor from double freeing
// Keeps deconstructor from double freeing
// pre move instance.
moveItem.ZeroOut();
}
@ -140,8 +129,8 @@ MySQLRequestResult& MySQLRequestResult::operator=(MySQLRequestResult&& other)
m_ColumnLengths = other.m_ColumnLengths;
m_Fields = other.m_Fields;
// Keeps deconstructor from double freeing
// Keeps deconstructor from double freeing
// pre move instance.
other.ZeroOut();
return *this;
}
}

View File

@ -1,6 +1,6 @@
#include "MySQLRequestRow.h"
MySQLRequestRow::MySQLRequestRow(const MySQLRequestRow& row)
MySQLRequestRow::MySQLRequestRow(const MySQLRequestRow& row)
: m_Result(row.m_Result), m_MySQLRow(row.m_MySQLRow)
{
}
@ -26,13 +26,17 @@ MySQLRequestRow& MySQLRequestRow::operator=(MySQLRequestRow& moveItem)
moveItem.m_Result = nullptr;
moveItem.m_MySQLRow = nullptr;
return *this;
}
MySQLRequestRow::MySQLRequestRow(MYSQL_RES *result)
: m_Result(result), m_MySQLRow(mysql_fetch_row(m_Result))
: m_Result(result)
{
if (result != nullptr)
m_MySQLRow = mysql_fetch_row(result);
else
m_MySQLRow = nullptr;
}
MySQLRequestRow& MySQLRequestRow::operator++()
@ -41,19 +45,19 @@ MySQLRequestRow& MySQLRequestRow::operator++()
return *this;
}
MySQLRequestRow MySQLRequestRow::operator++(int)
MySQLRequestRow MySQLRequestRow::operator++(int)
{
MySQLRequestRow tmp(*this);
operator++();
MySQLRequestRow tmp(*this);
operator++();
return tmp;
}
bool MySQLRequestRow::operator==(const MySQLRequestRow& rhs)
bool MySQLRequestRow::operator==(const MySQLRequestRow& rhs)
{
return m_MySQLRow == rhs.m_MySQLRow;
}
bool MySQLRequestRow::operator!=(const MySQLRequestRow& rhs)
bool MySQLRequestRow::operator!=(const MySQLRequestRow& rhs)
{
return m_MySQLRow != rhs.m_MySQLRow;
}

View File

@ -38,8 +38,9 @@
// original source:
// https://github.com/facebook/folly/blob/master/folly/String.cpp
//
void vStringFormat(std::string& output, const char* format, va_list args)
const std::string vStringFormat(const char* format, va_list args)
{
std::string output;
va_list tmpargs;
va_copy(tmpargs,args);
@ -48,11 +49,8 @@ void vStringFormat(std::string& output, const char* format, va_list args)
if (characters_used < 0) {
// Looks like we have an invalid format string.
// error out.
std::string errorMessage("Invalid format string; snprintf returned negative with format string: ");
errorMessage.append(format);
throw std::runtime_error(errorMessage);
// return empty string.
return "";
}
else if ((unsigned int)characters_used > output.capacity()) {
output.resize(characters_used+1);
@ -62,12 +60,10 @@ void vStringFormat(std::string& output, const char* format, va_list args)
if (characters_used < 0) {
// We shouldn't have a format error by this point, but I can't imagine what error we
// could have by this point. Still, error out and report it.
std::string errorMessage("Invalid format string or unknown vsnprintf error; vsnprintf returned negative with format string: ");
errorMessage.append(format);
throw std::runtime_error(errorMessage);
// could have by this point. Still, return empty string;
return "";
}
return std::move(output);
}
else {
output.resize(characters_used + 1);
@ -78,24 +74,23 @@ void vStringFormat(std::string& output, const char* format, va_list args)
if (characters_used < 0) {
// We shouldn't have a format error by this point, but I can't imagine what error we
// could have by this point. still error out and report it.
std::string errorMessage("Invalid format string or unknown vsnprintf error; vsnprintf returned negative with format string: ");
errorMessage.append(format);
throw std::runtime_error(errorMessage);
// could have by this point. Still, return empty string;
return "";
}
return std::move(output);
}
}
void StringFormat(std::string& output, const char* format, ...)
const std::string StringFormat(const char* format, ...)
{
va_list args;
va_start(args, format);
vStringFormat(output,format,args);
std::string output = vStringFormat(format,args);
va_end(args);
return std::move(output);
}
// normal strncpy doesnt put a null term on copied strings, this one does
// ref: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcecrt/htm/_wcecrt_strncpy_wcsncpy.asp
char* strn0cpy(char* dest, const char* source, uint32 size) {
@ -384,3 +379,15 @@ std::string EscapeString(const std::string &s) {
return ret;
}
bool isAlphaNumeric(const char *text)
{
for (unsigned int charIndex=0; charIndex<strlen(text); charIndex++) {
if ((text[charIndex] < 'a' || text[charIndex] > 'z') &&
(text[charIndex] < 'A' || text[charIndex] > 'Z') &&
(text[charIndex] < '0' || text[charIndex] > '9'))
return false;
}
return true;
}

View File

@ -19,11 +19,12 @@
#include <sstream>
#include <vector>
#include <cstdarg>
#include <string.h>
#include "types.h"
void vStringFormat(std::string& output, const char* format, va_list args);
void StringFormat(std::string& output, const char* format, ...);
const std::string vStringFormat(const char* format, va_list args);
const std::string StringFormat(const char* format, ...);
std::string EscapeString(const std::string &s);
const char *MakeLowerString(const char *source);
@ -51,4 +52,6 @@ char *RemoveApostrophes(const char *s);
std::vector<std::string> SplitString(const std::string &s, char delim);
bool isAlphaNumeric(const char *text);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -130,7 +130,7 @@ public:
uint32 GetAccountIDByChar(const char* charname, uint32* oCharID = 0);
uint32 GetAccountIDByChar(uint32 char_id);
uint32 GetAccountIDByName(const char* accname, int16* status = 0, uint32* lsid = 0);
uint32 GetGuildDBIDByCharID(uint32 char_id);
uint32 GetGuildIDByCharID(uint32 char_id);
void GetAccountName(uint32 accountid, char* name, uint32* oLSAccountID = 0);
void GetCharName(uint32 char_id, char* name);
uint32 GetCharacterInfo(const char* iName, uint32* oAccID = 0, uint32* oZoneID = 0, uint32* oInstanceID = 0,float* oX = 0, float* oY = 0, float* oZ = 0);
@ -207,6 +207,7 @@ public:
char* GetGroupLeadershipInfo(uint32 gid, char* leaderbuf, char* maintank = nullptr, char* assist = nullptr, char* puller = nullptr, char *marknpc = nullptr,
GroupLeadershipAA_Struct* GLAA = nullptr);
void ClearGroupLeader(uint32 gid = 0);
/*
* Raids
@ -223,7 +224,7 @@ public:
bool SetVariable(const char* varname, const char* varvalue);
bool LoadVariables();
uint32 LoadVariables_MQ(char** query);
bool LoadVariables_result(MYSQL_RES* result);
bool LoadVariables_result(MySQLRequestResult results);
/*
* General Queries
@ -262,7 +263,20 @@ private:
uint32 varcache_max;
VarCache_Struct** varcache_array;
uint32 varcache_lastupdate;
/*
* Groups, utility methods.
*/
void ClearAllGroupLeaders();
void ClearAllGroups();
/*
* Raid, utility methods.
*/
void ClearAllRaids();
void ClearAllRaidDetails();
};
bool FetchRowMap(MYSQL_RES *result, std::map<std::string,std::string> &rowmap);
#endif

View File

@ -80,10 +80,10 @@ MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, boo
pStatus = Error;
// error appears to be a disconnect error, may need to try again.
if (errorNumber == CR_SERVER_LOST || errorNumber == CR_SERVER_GONE_ERROR)
if (errorNumber == CR_SERVER_LOST || errorNumber == CR_SERVER_GONE_ERROR)
{
if (retryOnFailureOnce)
if (retryOnFailureOnce)
{
std::cout << "Database Error: Lost connection, attempting to recover...." << std::endl;
MySQLRequestResult requestResult = QueryDatabase(query, querylen, false);
@ -95,18 +95,18 @@ MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, boo
}
}
pStatus = Error;
char *errorBuffer = new char[MYSQL_ERRMSG_SIZE];
snprintf(errorBuffer, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
std::cout << "DB Query Error #" << mysql_errno(&mysql) << ": " << mysql_error(&mysql) << std::endl;
return MySQLRequestResult(nullptr, 0, 0, 0, 0, (uint32)mysql_errno(&mysql), errorBuffer);
}
}
char *errorBuffer = new char[MYSQL_ERRMSG_SIZE];
snprintf(errorBuffer, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
@ -114,21 +114,26 @@ MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, boo
std::cout << "DB Query Error #" << mysql_errno(&mysql) << ": " << mysql_error(&mysql) << std::endl;
#endif
return MySQLRequestResult(nullptr, 0, 0, 0, 0, mysql_errno(&mysql),errorBuffer);
}
// successful query. get results.
MYSQL_RES* res = mysql_store_result(&mysql);
MySQLRequestResult requestResult(res, (uint32)mysql_affected_rows(&mysql), (uint32)mysql_num_rows(res), (uint32)mysql_field_count(&mysql), (uint32)mysql_insert_id(&mysql));
uint32 rowCount = 0;
if (res != nullptr)
rowCount = (uint32)mysql_num_rows(res);
MySQLRequestResult requestResult(res, (uint32)mysql_affected_rows(&mysql), rowCount, (uint32)mysql_field_count(&mysql), (uint32)mysql_insert_id(&mysql));
#if DEBUG_MYSQL_QUERIES >= 1
if (requestResult.Success())
if (requestResult.Success())
{
std::cout << "query successful";
if (requestResult.Result())
std::cout << ", " << (int) mysql_num_rows(requestResult.Result()) << " rows returned";
std::cout << ", " << requestResult.RowCount() << " rows affected";
std::cout<< std::endl;
}

View File

@ -237,7 +237,7 @@ std::string EmuConstants::InventorySubName(int16 sub) {
return "Unknown Sub";
std::string ret_str;
StringFormat(ret_str, "Container %i", (sub + 1)); // zero-based index..but, count starts at one
ret_str = StringFormat("Container %i", (sub + 1)); // zero-based index..but, count starts at one
return ret_str;
}
@ -250,7 +250,7 @@ std::string EmuConstants::InventoryAugName(int16 aug) {
return "Unknown Aug";
std::string ret_str;
StringFormat(ret_str, "Augment %i", (aug + 1)); // zero-based index..but, count starts at one
ret_str = StringFormat("Augment %i", (aug + 1)); // zero-based index..but, count starts at one
return ret_str;
}
@ -929,7 +929,7 @@ uint64 EQLimits::PossessionsBitmask(uint32 version) {
/*Underfoot*/ 0x000000027FFFFFFF,
/*RoF*/ 0x00000003FFFFFFFF,
/*RoF2*/ 0,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
@ -950,7 +950,7 @@ uint64 EQLimits::EquipmentBitmask(uint32 version) {
/*Underfoot*/ 0x00000000007FFFFF,
/*RoF*/ 0x00000000007FFFFF,
/*RoF2*/ 0,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
@ -971,7 +971,7 @@ uint64 EQLimits::GeneralBitmask(uint32 version) {
/*Underfoot*/ 0x000000007F800000,
/*RoF*/ 0x00000001FF800000,
/*RoF2*/ 0,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
@ -992,7 +992,7 @@ uint64 EQLimits::CursorBitmask(uint32 version) {
/*Underfoot*/ 0x0000000200000000,
/*RoF*/ 0x0000000200000000,
/*RoF2*/ 0,
/*NPC*/ 0,
/*Merc*/ 0,
/*Bot*/ 0,
@ -1013,13 +1013,13 @@ bool EQLimits::AllowsEmptyBagInBag(uint32 version) {
/*Underfoot*/ Underfoot::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*RoF*/ RoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
/*RoF2*/ false,
/*NPC*/ false,
/*Merc*/ false,
/*Bot*/ false,
/*Pet*/ false
};
return false; // not implemented
//return local[ValidateMobVersion(version)];
}
@ -1035,7 +1035,7 @@ uint16 EQLimits::ItemCommonSize(uint32 version) {
/*Underfoot*/ EmuConstants::ITEM_COMMON_SIZE,
/*RoF*/ EmuConstants::ITEM_COMMON_SIZE,
/*RoF2*/ 0,
/*NPC*/ EmuConstants::ITEM_COMMON_SIZE,
/*Merc*/ EmuConstants::ITEM_COMMON_SIZE,
/*Bot*/ EmuConstants::ITEM_COMMON_SIZE,
@ -1055,7 +1055,7 @@ uint16 EQLimits::ItemContainerSize(uint32 version) {
/*Underfoot*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*RoF*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*RoF2*/ 0,
/*NPC*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*Merc*/ EmuConstants::ITEM_CONTAINER_SIZE,
/*Bot*/ EmuConstants::ITEM_CONTAINER_SIZE,
@ -1075,7 +1075,7 @@ bool EQLimits::CoinHasWeight(uint32 version) {
/*Underfoot*/ Underfoot::limits::COIN_HAS_WEIGHT,
/*RoF*/ RoF::limits::COIN_HAS_WEIGHT,
/*RoF2*/ true,
/*NPC*/ true,
/*Merc*/ true,
/*Bot*/ true,
@ -1095,7 +1095,7 @@ uint32 EQLimits::BandoliersCount(uint32 version) {
/*Underfoot*/ EmuConstants::BANDOLIERS_COUNT,
/*RoF*/ EmuConstants::BANDOLIERS_COUNT,
/*RoF2*/ 0,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
/*Bot*/ NOT_USED,
@ -1115,7 +1115,7 @@ uint32 EQLimits::BandolierSize(uint32 version) {
/*Underfoot*/ EmuConstants::BANDOLIER_SIZE,
/*RoF*/ EmuConstants::BANDOLIER_SIZE,
/*RoF2*/ 0,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
/*Bot*/ NOT_USED,
@ -1135,7 +1135,7 @@ uint32 EQLimits::PotionBeltSize(uint32 version) {
/*Underfoot*/ EmuConstants::POTION_BELT_SIZE,
/*RoF*/ EmuConstants::POTION_BELT_SIZE,
/*RoF2*/ 0,
/*NPC*/ NOT_USED,
/*Merc*/ NOT_USED,
/*Bot*/ NOT_USED,

View File

@ -33,9 +33,7 @@ void log_message(LogType type, const char *fmt, ...) {
}
void log_messageVA(LogType type, const char *fmt, va_list args) {
std::string prefix_buffer;
StringFormat(prefix_buffer, "[%s] ", log_type_info[type].name);
std::string prefix_buffer = StringFormat("[%s] ", log_type_info[type].name);
LogFile->writePVA(EQEMuLog::Debug, prefix_buffer.c_str(), fmt, args);
}

View File

@ -0,0 +1,34 @@
-- AA MGB update
UPDATE altadv_vars SET spellid = 5228 WHERE skill_id = 128;
UPDATE aa_actions SET spell_id = 5228, nonspell_action = 0 WHERE aaid = 128;
-- AA Project Illusion update
UPDATE altadv_vars SET spellid = 5227 WHERE skill_id = 643;
UPDATE aa_actions SET spell_id = 5227, nonspell_action = 0 WHERE aaid = 643;
-- AA Improved Reclaim Energy
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('180', '1', '241', '95', '0');
-- AA Headshot
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('644', '1', '217', '0', '32000');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('644', '2', '346', '46', '0');
-- AA Anatomy (Rogue Assassinate)
INSERT INTO `altadv_vars` (`skill_id`, `name`, `cost`, `max_level`, `hotkey_sid`, `hotkey_sid2`, `title_sid`, `desc_sid`, `type`, `spellid`, `prereq_skill`, `prereq_minpoints`, `spell_type`, `spell_refresh`, `classes`, `berserker`, `class_type`, `cost_inc`, `aa_expansion`, `special_category`, `sof_type`, `sof_cost_inc`, `sof_max_level`, `sof_next_skill`, `clientver`, `account_time_required`, `sof_current_level`,`sof_next_id`,`level_inc`) VALUES ('1604', 'Anatomy', '5', '3', '4294967295', '4294967295', '1604', '1604', '1', '4294967295', '0', '0', '0', '0', '512', '0', '60', '1', '10', '4294967295', '3', '0', '3', '1604', '1', '0', '0', '0', '0');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('1604', '1', '439', '0', '32000');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('1604', '2', '345', '48', '0');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('1605', '1', '439', '0', '32000');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('1605', '2', '345', '51', '0');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('1606', '1', '439', '0', '32000');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('1606', '2', '345', '53', '0');
-- AA Finishing Blow Fix
DELETE FROM aa_effects WHERE aaid = 199 AND slot = 2;
DELETE FROM aa_effects WHERE aaid = 200 AND slot = 2;
DELETE FROM aa_effects WHERE aaid = 201 AND slot = 2;
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('119', '1', '278', '500', '32000');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('119', '2', '440', '50', '200');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('120', '1', '278', '500', '32000');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('120', '2', '440', '52', '200');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('121', '1', '278', '500', '32000');
INSERT INTO `aa_effects` (`aaid`, `slot`, `effectid`, `base1`, `base2`) VALUES ('121', '2', '440', '54', '200');

View File

@ -12,8 +12,7 @@
void log_message_clientVA(LogType type, Client *who, const char *fmt, va_list args) {
std::string prefix_buffer;
StringFormat(prefix_buffer,"[%s] %s: ", log_type_info[type].name, who->GetAccountName());
std::string prefix_buffer = StringFormat("[%s] %s: ", log_type_info[type].name, who->GetAccountName());
LogFile->writePVA(EQEMuLog::Debug, prefix_buffer.c_str(), fmt, args);
}
@ -31,11 +30,11 @@ void log_message_zoneVA(LogType type, ZoneServer *who, const char *fmt, va_list
const char *zone_name=who->GetZoneName();
if (zone_name == nullptr)
StringFormat(zone_tag,"[%d]", who->GetID());
zone_tag = StringFormat("[%d]", who->GetID());
else
StringFormat(zone_tag,"[%d] [%s]",who->GetID(),zone_name);
zone_tag = StringFormat("[%d] [%s]",who->GetID(),zone_name);
StringFormat(prefix_buffer, "[%s] %s ", log_type_info[type].name, zone_tag.c_str());
prefix_buffer = StringFormat("[%s] %s ", log_type_info[type].name, zone_tag.c_str());
LogFile->writePVA(EQEMuLog::Debug, prefix_buffer.c_str(), fmt, args);
}

View File

@ -2015,7 +2015,7 @@ float Mob::GetSpecialProcChances(uint16 hand)
ProcBonus += static_cast<float>(mydex/35) + static_cast<float>(itembonuses.HeroicDEX / 25);
ProcChance += ProcChance * ProcBonus / 100.0f;
} else {
/*PRE 2014 CHANGE Dev Quote - "Elidroth SOE:Proc chance is a function of your base hardcapped Dexterity / 35 + Heroic Dexterity / 25.
/*PRE 2014 CHANGE Dev Quote - "Elidroth SOE:Proc chance is a function of your base hardcapped Dexterity / 35 + Heroic Dexterity / 25.”
Kayen: Most reports suggest a ~ 6% chance to Headshot which consistent with above.*/
ProcChance = (static_cast<float>(mydex/35) + static_cast<float>(itembonuses.HeroicDEX / 25))/100.0f;