mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 04:11:30 +00:00
Merge pull request #787 from noudess/master
Fix Get Corpse to fetch the corpse indicated.
This commit is contained in:
commit
50525429ff
@ -4356,15 +4356,15 @@ uint32 ZoneDatabase::GetCharacterCorpseCount(uint32 char_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32 ZoneDatabase::GetCharacterCorpseID(uint32 char_id, uint8 corpse) {
|
uint32 ZoneDatabase::GetCharacterCorpseID(uint32 char_id, uint8 corpse) {
|
||||||
std::string query = StringFormat("SELECT `id` FROM `character_corpses` WHERE `charid` = '%u'", char_id);
|
std::string query = StringFormat("SELECT `id` FROM `character_corpses` WHERE `charid` = '%u' limit %d, 1", char_id, corpse);
|
||||||
auto results = QueryDatabase(query);
|
|
||||||
|
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
auto results = QueryDatabase(query);
|
||||||
for (int i = 0; i < corpse; i++) {
|
auto row = results.begin();
|
||||||
return atoul(row[0]);
|
|
||||||
}
|
if (row != results.end())
|
||||||
}
|
return atoul(row[0]);
|
||||||
return 0;
|
else
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 ZoneDatabase::GetCharacterCorpseItemCount(uint32 corpse_id){
|
uint32 ZoneDatabase::GetCharacterCorpseItemCount(uint32 corpse_id){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user