removed unneeded querylength parameter from TradeskillSearchResults

This commit is contained in:
Arthur Ice 2014-10-08 14:41:34 -07:00
parent d5955da08c
commit 0fde0fbd23
3 changed files with 26 additions and 26 deletions

View File

@ -314,7 +314,7 @@ public:
/* New PP Save Functions */
bool SaveCurrency(){ return database.SaveCharacterCurrency(this->CharacterID(), &m_pp); }
bool SaveAA();
inline bool ClientDataLoaded() const { return client_data_loaded; }
inline bool Connected() const { return (client_state == CLIENT_CONNECTED); }
inline bool InZone() const { return (client_state == CLIENT_CONNECTED || client_state == CLIENT_LINKDEAD); }
@ -664,7 +664,7 @@ public:
void IncreaseLanguageSkill(int skill_id, int value = 1);
virtual uint16 GetSkill(SkillUseTypes skill_id) const { if (skill_id <= HIGHEST_SKILL) { return((itembonuses.skillmod[skill_id] > 0) ? m_pp.skills[skill_id] * (100 + itembonuses.skillmod[skill_id]) / 100 : m_pp.skills[skill_id]); } return 0; }
uint32 GetRawSkill(SkillUseTypes skill_id) const { if (skill_id <= HIGHEST_SKILL) { return(m_pp.skills[skill_id]); } return 0; }
bool HasSkill(SkillUseTypes skill_id) const;
bool HasSkill(SkillUseTypes skill_id) const;
bool CanHaveSkill(SkillUseTypes skill_id) const;
void SetSkill(SkillUseTypes skill_num, uint16 value);
void AddSkill(SkillUseTypes skillid, uint16 value);
@ -681,7 +681,7 @@ public:
inline uint16 MaxSkill(SkillUseTypes skillid) const { return MaxSkill(skillid, GetClass(), GetLevel()); }
uint8 SkillTrainLevel(SkillUseTypes skillid, uint16 class_);
void TradeskillSearchResults(const char *query, unsigned long qlen, unsigned long objtype, unsigned long someid);
void TradeskillSearchResults(const char *query, unsigned long objtype, unsigned long someid);
void SendTradeskillDetails(uint32 recipe_id);
bool TradeskillExecute(DBTradeskillRecipe_Struct *spec);
void CheckIncreaseTradeskill(int16 bonusstat, int16 stat_modifier, float skillup_modifier, uint16 success_modifier, SkillUseTypes tradeskill);
@ -1452,7 +1452,7 @@ private:
unsigned int RestRegenHP;
unsigned int RestRegenMana;
unsigned int RestRegenEndurance;
bool EngagedRaidTarget;
uint32 SavedRaidRestTimer;

View File

@ -523,7 +523,7 @@ void Client::CompleteConnect()
switch (rank) {
case 0: { rank = 5; break; } // GUILD_MEMBER 0
case 1: { rank = 3; break; } // GUILD_OFFICER 1
case 2: { rank = 1; break; } // GUILD_LEADER 2
case 2: { rank = 1; break; } // GUILD_LEADER 2
default: { break; } // GUILD_NONE
}
}
@ -848,7 +848,7 @@ void Client::CompleteConnect()
void Client::CheatDetected(CheatTypes CheatType, float x, float y, float z)
{
//ToDo: Break warp down for special zones. Some zones have special teleportation pads or bad .map files which can trigger the detector without a legit zone request.
switch (CheatType)
{
case MQWarp: //Some zones may still have issues. Database updates will eliminate most if not all problems.
@ -1304,7 +1304,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
if(strlen(cze->char_name) > 63)
return;
conn_state = ReceivedZoneEntry;
conn_state = ReceivedZoneEntry;
ClientVersion = Connection()->ClientVersion();
if (ClientVersion != EQClientUnknown)
@ -1329,7 +1329,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
client_state = CLIENT_KICKED;
return;
}
strcpy(name, cze->char_name);
/* Check for Client Spoofing */
if (client != 0) {
@ -1342,7 +1342,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
client->Disconnect();
}
uint32 pplen = 0;
uint32 pplen = 0;
EQApplicationPacket* outapp = 0;
MYSQL_RES* result = 0;
bool loaditems = 0;
@ -1366,8 +1366,8 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
if (lsaccountid && atoi(row[2]) > 0){ lsaccountid = atoi(row[2]); }
else{ lsaccountid = 0; }
gmspeed = atoi(row[3]);
revoked = atoi(row[4]);
gmhideme = atoi(row[5]);
revoked = atoi(row[4]);
gmhideme = atoi(row[5]);
if (account_creation){ account_creation = atoul(row[6]); }
}
@ -1375,17 +1375,17 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
query = StringFormat("SELECT `lfp`, `lfg`, `xtargets`, `firstlogon`, `guild_id`, `rank` FROM `character_data` LEFT JOIN `guild_members` ON `id` = `char_id` WHERE `id` = %i", cid);
results = database.QueryDatabase(query);
for (auto row = results.begin(); row != results.end(); ++row) {
if (row[4] && atoi(row[4]) > 0){
guild_id = atoi(row[4]);
if (row[4] && atoi(row[4]) > 0){
guild_id = atoi(row[4]);
if (row[5] != nullptr){ guildrank = atoi(row[5]); }
else{ guildrank = GUILD_RANK_NONE; }
}
if (LFP){ LFP = atoi(row[0]); }
if (LFG){ LFG = atoi(row[1]); }
if (firstlogon){ firstlogon = atoi(row[3]); }
}
if (RuleB(Character, SharedBankPlat))
m_pp.platinum_shared = database.GetSharedPlatinum(this->AccountID());
@ -1417,7 +1417,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
/* Set Con State for Reporting */
conn_state = PlayerProfileLoaded;
m_pp.zone_id = zone->GetZoneID();
m_pp.zone_id = zone->GetZoneID();
m_pp.zoneInstance = zone->GetInstanceID();
/* Set Total Seconds Played */
@ -1426,7 +1426,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
max_AAXP = RuleI(AA, ExpPerPoint);
/* If we can maintain intoxication across zones, check for it */
if (!RuleB(Character, MaintainIntoxicationAcrossZones))
m_pp.intoxication = 0;
m_pp.intoxication = 0;
strcpy(name, m_pp.name);
strcpy(lastname, m_pp.last_name);
@ -1435,14 +1435,14 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
m_pp.x = zone->safe_x();
m_pp.y = zone->safe_y();
m_pp.z = zone->safe_z();
}
}
/* If too far below ground, then fix */
// float ground_z = GetGroundZ(m_pp.x, m_pp.y, m_pp.z);
// if (m_pp.z < (ground_z - 500))
// m_pp.z = ground_z;
/* Set Mob variables for spawn */
class_ = m_pp.class_;
class_ = m_pp.class_;
level = m_pp.level;
x_pos = m_pp.x;
y_pos = m_pp.y;
@ -1471,7 +1471,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
/* Load Guild */
if (!IsInAGuild()) { m_pp.guild_id = GUILD_NONE; }
else {
m_pp.guild_id = GuildID();
m_pp.guild_id = GuildID();
if (zone->GetZoneID() == RuleI(World, GuildBankZoneID))
GuildBanker = (guild_mgr.IsGuildLeader(GuildID(), CharacterID()) || guild_mgr.GetBankerFlag(CharacterID()));
}
@ -1711,12 +1711,12 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
#endif
/* Reset to max so they dont drown on zone in if its underwater */
m_pp.air_remaining = 60;
m_pp.air_remaining = 60;
/* Check for PVP Zone status*/
if (zone->IsPVPZone())
m_pp.pvp = 1;
/* Time entitled on Account: Move to account */
m_pp.timeentitledonaccount = database.GetTotalTimeEntitledOnAccount(AccountID()) / 1440;
m_pp.timeentitledonaccount = database.GetTotalTimeEntitledOnAccount(AccountID()) / 1440;
/* Reset rest timer if the durations have been lowered in the database */
if ((m_pp.RestTimer > RuleI(Character, RestRegenTimeToActivate)) && (m_pp.RestTimer > RuleI(Character, RestRegenRaidTimeToActivate)))
m_pp.RestTimer = 0;
@ -1836,7 +1836,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
QueuePacket(outapp);
safe_delete(outapp);
SetAttackTimer();
SetAttackTimer();
conn_state = ZoneInfoSent;
return;
@ -11358,7 +11358,7 @@ void Client::Handle_OP_RecipesFavorite(const EQApplicationPacket *app)
" HAVING sum(if(tre.item_id %s AND tre.iscontainer > 0,1,0)) > 0 "
" LIMIT 100 ", CharacterID(), buf, containers);
TradeskillSearchResults(query, qlen, tsf->object_type, tsf->some_id);
TradeskillSearchResults(query, tsf->object_type, tsf->some_id);
safe_delete_array(query);
return;
@ -11416,7 +11416,7 @@ void Client::Handle_OP_RecipesSearch(const EQApplicationPacket *app)
" LIMIT 200 "
, CharacterID(), searchclause, rss->mintrivial, rss->maxtrivial, containers);
TradeskillSearchResults(query, qlen, rss->object_type, rss->some_id);
TradeskillSearchResults(query, rss->object_type, rss->some_id);
safe_delete_array(query);
return;

View File

@ -636,7 +636,7 @@ SkillUseTypes Object::TypeToSkill(uint32 type)
return TradeskillUnknown;
}
void Client::TradeskillSearchResults(const char *query, unsigned long qlen, unsigned long objtype, unsigned long someid) {
void Client::TradeskillSearchResults(const char *query, unsigned long objtype, unsigned long someid) {
std::string internalQuery(query);
auto results = database.QueryDatabase(internalQuery);