mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 06:21:28 +00:00
Fix for forage crash
This commit is contained in:
parent
b392d16808
commit
a3b54e5cae
@ -319,7 +319,7 @@ bool Database::DeleteAccount(const char* name) {
|
||||
}
|
||||
|
||||
bool Database::SetLocalPassword(uint32 accid, const char* password) {
|
||||
std::string query = StringFormat("UPDATE account SET password=MD5('%s') where id=%i;", password, accid);
|
||||
std::string query = StringFormat("UPDATE account SET password=MD5('%s') where id=%i;", EscapeString(password).c_str(), accid);
|
||||
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
|
||||
@ -356,9 +356,11 @@ void Client::GoFish()
|
||||
inst = m_inv.GetItem(MainCursor);
|
||||
}
|
||||
|
||||
std::vector<EQEmu::Any> args;
|
||||
args.push_back(inst);
|
||||
parse->EventPlayer(EVENT_FISH_SUCCESS, this, "", inst->GetID(), &args);
|
||||
if(inst) {
|
||||
std::vector<EQEmu::Any> args;
|
||||
args.push_back(inst);
|
||||
parse->EventPlayer(EVENT_FISH_SUCCESS, this, "", inst->GetID(), &args);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -470,9 +472,11 @@ void Client::ForageItem(bool guarantee) {
|
||||
inst = m_inv.GetItem(MainCursor);
|
||||
}
|
||||
|
||||
std::vector<EQEmu::Any> args;
|
||||
args.push_back(inst);
|
||||
parse->EventPlayer(EVENT_FORAGE_SUCCESS, this, "", inst->GetID(), &args);
|
||||
if(inst) {
|
||||
std::vector<EQEmu::Any> args;
|
||||
args.push_back(inst);
|
||||
parse->EventPlayer(EVENT_FORAGE_SUCCESS, this, "", inst->GetID(), &args);
|
||||
}
|
||||
}
|
||||
|
||||
int ChanceSecondForage = aabonuses.ForageAdditionalItems + itembonuses.ForageAdditionalItems + spellbonuses.ForageAdditionalItems;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user