mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Misc: Fix some static analysis warnings exposed after 6b8f3d0.
(cherry picked from commit 59be657ca2)
This commit is contained in:
@@ -144,12 +144,6 @@ void CalendarMgr::AddEvent(CalendarEvent* calendarEvent, CalendarSendEventType s
|
||||
SendCalendarEvent(calendarEvent->GetOwnerGUID(), *calendarEvent, sendType);
|
||||
}
|
||||
|
||||
void CalendarMgr::AddInvite(CalendarEvent* calendarEvent, CalendarInvite* invite)
|
||||
{
|
||||
CharacterDatabaseTransaction dummy;
|
||||
AddInvite(calendarEvent, invite, dummy);
|
||||
}
|
||||
|
||||
void CalendarMgr::AddInvite(CalendarEvent* calendarEvent, CalendarInvite* invite, CharacterDatabaseTransaction trans)
|
||||
{
|
||||
if (!calendarEvent->IsGuildAnnouncement() && calendarEvent->GetOwnerGUID() != invite->GetInviteeGUID())
|
||||
@@ -269,12 +263,6 @@ void CalendarMgr::UpdateEvent(CalendarEvent* calendarEvent)
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
void CalendarMgr::UpdateInvite(CalendarInvite* invite)
|
||||
{
|
||||
CharacterDatabaseTransaction dummy;
|
||||
UpdateInvite(invite, dummy);
|
||||
}
|
||||
|
||||
void CalendarMgr::UpdateInvite(CalendarInvite* invite, CharacterDatabaseTransaction trans)
|
||||
{
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_REP_CALENDAR_INVITE);
|
||||
|
||||
@@ -325,11 +325,9 @@ class TC_GAME_API CalendarMgr
|
||||
void RemoveEvent(CalendarEvent* calendarEvent, ObjectGuid remover);
|
||||
void UpdateEvent(CalendarEvent* calendarEvent);
|
||||
|
||||
void AddInvite(CalendarEvent* calendarEvent, CalendarInvite* invite);
|
||||
void AddInvite(CalendarEvent* calendarEvent, CalendarInvite* invite, CharacterDatabaseTransaction trans);
|
||||
void AddInvite(CalendarEvent* calendarEvent, CalendarInvite* invite, CharacterDatabaseTransaction trans = nullptr);
|
||||
void RemoveInvite(uint64 inviteId, uint64 eventId, ObjectGuid remover);
|
||||
void UpdateInvite(CalendarInvite* invite);
|
||||
void UpdateInvite(CalendarInvite* invite, CharacterDatabaseTransaction trans);
|
||||
void UpdateInvite(CalendarInvite* invite, CharacterDatabaseTransaction trans = nullptr);
|
||||
|
||||
void RemoveAllPlayerEventsAndInvites(ObjectGuid guid);
|
||||
void RemovePlayerGuildEventsAndSignups(ObjectGuid guid, ObjectGuid::LowType guildId);
|
||||
|
||||
@@ -4221,7 +4221,7 @@ void Player::DeleteOldCharacters(uint32 keepDays)
|
||||
TC_LOG_INFO("entities.player", "Player::DeleteOldCharacters: Deleting all characters which have been deleted %u days before...", keepDays);
|
||||
|
||||
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_OLD_CHARS);
|
||||
stmt->setUInt32(0, uint32(GameTime::GetGameTime() - time_t(keepDays * DAY)));
|
||||
stmt->setUInt32(0, static_cast<uint32>(GameTime::GetGameTime() - static_cast<time_t>(keepDays) * DAY));
|
||||
PreparedQueryResult result = CharacterDatabase.Query(stmt);
|
||||
|
||||
if (result)
|
||||
|
||||
@@ -593,14 +593,13 @@ public:
|
||||
handler->PSendSysMessage(LANG_SUMMONING, nameLink.c_str(), handler->GetTrinityString(LANG_OFFLINE));
|
||||
|
||||
// in point where GM stay
|
||||
CharacterDatabaseTransaction dummy;
|
||||
Player::SavePositionInDB(WorldLocation(_player->GetMapId(),
|
||||
_player->GetPositionX(),
|
||||
_player->GetPositionY(),
|
||||
_player->GetPositionZ(),
|
||||
_player->GetOrientation()),
|
||||
_player->GetZoneId(),
|
||||
targetGuid, dummy);
|
||||
targetGuid, nullptr);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -132,8 +132,7 @@ public:
|
||||
WorldLocation loc(fieldsDB[0].GetUInt16(), fieldsDB[2].GetFloat(), fieldsDB[3].GetFloat(), fieldsDB[4].GetFloat(), 0.0f);
|
||||
uint32 zoneId = fieldsDB[1].GetUInt16();
|
||||
|
||||
CharacterDatabaseTransaction dummy;
|
||||
Player::SavePositionInDB(loc, zoneId, player->GetGUID(), dummy);
|
||||
Player::SavePositionInDB(loc, zoneId, player->GetGUID(), nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,9 +178,8 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_TELEPORTING_TO, nameLink.c_str(), handler->GetTrinityString(LANG_OFFLINE), tele->name.c_str());
|
||||
|
||||
CharacterDatabaseTransaction dummy;
|
||||
Player::SavePositionInDB(WorldLocation(tele->mapId, tele->position_x, tele->position_y, tele->position_z, tele->orientation),
|
||||
sMapMgr->GetZoneId(PhasingHandler::GetEmptyPhaseShift(), tele->mapId, tele->position_x, tele->position_y, tele->position_z), player->GetGUID(), dummy);
|
||||
sMapMgr->GetZoneId(PhasingHandler::GetEmptyPhaseShift(), tele->mapId, tele->position_x, tele->position_y, tele->position_z), player->GetGUID(), nullptr);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user