mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 20:51:29 +00:00
Shendare: VS2013 query StringFormat glitches when "%f" is passed for the int GetRunSpeed().
Shendare: In CreateNewNPCCommand(), the npc_type_id and spawngroupid are created in the database, but never set in the spawn class, so later it can't delete them with #npcspawn remove or #npcspawn delete.
This commit is contained in:
parent
4106251497
commit
a04e78cfd1
@ -1,5 +1,9 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
== 08/02/2015 ==
|
||||||
|
Shendare: VS2013 query StringFormat glitches when "%f" is passed for the int GetRunSpeed().
|
||||||
|
Shendare: In CreateNewNPCCommand(), the npc_type_id and spawngroupid are created in the database, but never set in the spawn class, so later it can't delete them with #npcspawn remove or #npcspawn delete.
|
||||||
|
|
||||||
== 07/27/2015 ==
|
== 07/27/2015 ==
|
||||||
Uleat: Reworked the QS Audit code in Handle_OP_ShopPlayerBuy (\zone\client_packet.cpp) to help eliminate potential for exception errors
|
Uleat: Reworked the QS Audit code in Handle_OP_ShopPlayerBuy (\zone\client_packet.cpp) to help eliminate potential for exception errors
|
||||||
|
|
||||||
|
|||||||
@ -431,6 +431,7 @@ public:
|
|||||||
((static_cast<float>(cur_mana) / max_mana) * 100); }
|
((static_cast<float>(cur_mana) / max_mana) * 100); }
|
||||||
virtual int32 CalcMaxMana();
|
virtual int32 CalcMaxMana();
|
||||||
uint32 GetNPCTypeID() const { return npctype_id; }
|
uint32 GetNPCTypeID() const { return npctype_id; }
|
||||||
|
void SetNPCTypeID(uint32 npctypeid) { npctype_id = npctypeid; }
|
||||||
inline const glm::vec4& GetPosition() const { return m_Position; }
|
inline const glm::vec4& GetPosition() const { return m_Position; }
|
||||||
inline const float GetX() const { return m_Position.x; }
|
inline const float GetX() const { return m_Position.x; }
|
||||||
inline const float GetY() const { return m_Position.y; }
|
inline const float GetY() const { return m_Position.y; }
|
||||||
|
|||||||
@ -1045,7 +1045,7 @@ uint32 ZoneDatabase::CreateNewNPCCommand(const char *zone, uint32 zone_version,
|
|||||||
query = StringFormat("INSERT INTO npc_types (id, name, level, race, class, hp, gender, "
|
query = StringFormat("INSERT INTO npc_types (id, name, level, race, class, hp, gender, "
|
||||||
"texture, helmtexture, size, loottable_id, merchant_id, face, "
|
"texture, helmtexture, size, loottable_id, merchant_id, face, "
|
||||||
"runspeed, prim_melee_type, sec_melee_type) "
|
"runspeed, prim_melee_type, sec_melee_type) "
|
||||||
"VALUES(%i, \"%s\" , %i, %i, %i, %i, %i, %i, %i, %f, %i, %i, %i, %f, %i, %i)",
|
"VALUES(%i, \"%s\" , %i, %i, %i, %i, %i, %i, %i, %f, %i, %i, %i, %i, %i, %i)",
|
||||||
npc_type_id, tmpstr, spawn->GetLevel(), spawn->GetRace(), spawn->GetClass(),
|
npc_type_id, tmpstr, spawn->GetLevel(), spawn->GetRace(), spawn->GetClass(),
|
||||||
spawn->GetMaxHP(), spawn->GetGender(), spawn->GetTexture(),
|
spawn->GetMaxHP(), spawn->GetGender(), spawn->GetTexture(),
|
||||||
spawn->GetHelmTexture(), spawn->GetSize(), spawn->GetLoottableID(),
|
spawn->GetHelmTexture(), spawn->GetSize(), spawn->GetLoottableID(),
|
||||||
@ -1059,7 +1059,7 @@ uint32 ZoneDatabase::CreateNewNPCCommand(const char *zone, uint32 zone_version,
|
|||||||
query = StringFormat("INSERT INTO npc_types (name, level, race, class, hp, gender, "
|
query = StringFormat("INSERT INTO npc_types (name, level, race, class, hp, gender, "
|
||||||
"texture, helmtexture, size, loottable_id, merchant_id, face, "
|
"texture, helmtexture, size, loottable_id, merchant_id, face, "
|
||||||
"runspeed, prim_melee_type, sec_melee_type) "
|
"runspeed, prim_melee_type, sec_melee_type) "
|
||||||
"VALUES(\"%s\", %i, %i, %i, %i, %i, %i, %i, %f, %i, %i, %i, %f, %i, %i)",
|
"VALUES(\"%s\", %i, %i, %i, %i, %i, %i, %i, %f, %i, %i, %i, %i, %i, %i)",
|
||||||
tmpstr, spawn->GetLevel(), spawn->GetRace(), spawn->GetClass(), spawn->GetMaxHP(),
|
tmpstr, spawn->GetLevel(), spawn->GetRace(), spawn->GetClass(), spawn->GetMaxHP(),
|
||||||
spawn->GetGender(), spawn->GetTexture(), spawn->GetHelmTexture(), spawn->GetSize(),
|
spawn->GetGender(), spawn->GetTexture(), spawn->GetHelmTexture(), spawn->GetSize(),
|
||||||
spawn->GetLoottableID(), spawn->MerchantType, 0, spawn->GetRunspeed(), 28, 28);
|
spawn->GetLoottableID(), spawn->MerchantType, 0, spawn->GetRunspeed(), 28, 28);
|
||||||
@ -1077,6 +1077,9 @@ uint32 ZoneDatabase::CreateNewNPCCommand(const char *zone, uint32 zone_version,
|
|||||||
}
|
}
|
||||||
uint32 spawngroupid = results.LastInsertedID();
|
uint32 spawngroupid = results.LastInsertedID();
|
||||||
|
|
||||||
|
spawn->SetSp2(spawngroupid);
|
||||||
|
spawn->SetNPCTypeID(npc_type_id);
|
||||||
|
|
||||||
query = StringFormat("INSERT INTO spawn2 (zone, version, x, y, z, respawntime, heading, spawngroupID) "
|
query = StringFormat("INSERT INTO spawn2 (zone, version, x, y, z, respawntime, heading, spawngroupID) "
|
||||||
"VALUES('%s', %u, %f, %f, %f, %i, %f, %i)",
|
"VALUES('%s', %u, %f, %f, %f, %i, %f, %i)",
|
||||||
zone, zone_version, spawn->GetX(), spawn->GetY(), spawn->GetZ(), 1200, spawn->GetHeading(),
|
zone, zone_version, spawn->GetX(), spawn->GetY(), spawn->GetZ(), 1200, spawn->GetHeading(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user