Core/DBLayer: Change some incorrect uses of PQuery with PExecute or Execute
This commit is contained in:
@@ -203,7 +203,9 @@ void Group::LoadMemberFromDB(uint32 guidLow, uint8 memberFlags, uint8 subgroup,
|
|||||||
// skip non-existed member
|
// skip non-existed member
|
||||||
if (!sObjectMgr->GetPlayerNameByGUID(member.guid, member.name))
|
if (!sObjectMgr->GetPlayerNameByGUID(member.guid, member.name))
|
||||||
{
|
{
|
||||||
CharacterDatabase.PQuery("DELETE FROM group_member WHERE memberGuid=%u", guidLow);
|
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_GROUP_MEMBER);
|
||||||
|
stmt->setUInt32(0, guidLow);
|
||||||
|
CharacterDatabase.Execute(stmt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public:
|
|||||||
{
|
{
|
||||||
uint32 tguid = chr->GetTransport()->AddNPCPassenger(0, id, chr->GetTransOffsetX(), chr->GetTransOffsetY(), chr->GetTransOffsetZ(), chr->GetTransOffsetO());
|
uint32 tguid = chr->GetTransport()->AddNPCPassenger(0, id, chr->GetTransOffsetX(), chr->GetTransOffsetY(), chr->GetTransOffsetZ(), chr->GetTransOffsetO());
|
||||||
if (tguid > 0)
|
if (tguid > 0)
|
||||||
WorldDatabase.PQuery("INSERT INTO creature_transport (guid, npc_entry, transport_entry, TransOffsetX, TransOffsetY, TransOffsetZ, TransOffsetO) values (%u, %u, %f, %f, %f, %f, %u)", tguid, id, chr->GetTransport()->GetEntry(), chr->GetTransOffsetX(), chr->GetTransOffsetY(), chr->GetTransOffsetZ(), chr->GetTransOffsetO());
|
WorldDatabase.PExecute("INSERT INTO creature_transport (guid, npc_entry, transport_entry, TransOffsetX, TransOffsetY, TransOffsetZ, TransOffsetO) values (%u, %u, %f, %f, %f, %f, %u)", tguid, id, chr->GetTransport()->GetEntry(), chr->GetTransOffsetX(), chr->GetTransOffsetY(), chr->GetTransOffsetZ(), chr->GetTransOffsetO());
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -679,7 +679,7 @@ public:
|
|||||||
|
|
||||||
if (target->GetTransport())
|
if (target->GetTransport())
|
||||||
if (target->GetGUIDTransport())
|
if (target->GetGUIDTransport())
|
||||||
WorldDatabase.PQuery("UPDATE creature_transport SET emote=%u WHERE transport_entry=%u AND guid=%u", emote, target->GetTransport()->GetEntry(), target->GetGUIDTransport());
|
WorldDatabase.PExecute("UPDATE creature_transport SET emote=%u WHERE transport_entry=%u AND guid=%u", emote, target->GetTransport()->GetEntry(), target->GetGUIDTransport());
|
||||||
|
|
||||||
target->SetUInt32Value(UNIT_NPC_EMOTESTATE, emote);
|
target->SetUInt32Value(UNIT_NPC_EMOTESTATE, emote);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user