mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/Calendar: Fix issue with invite status being set to the wrong invite
Consider the case of Player A inviting Player B to a Calendar Event. After Player B clicks on Accepts/Tentative/Reject, the calendar shows that status for Player A instead.
(cherry picked from commit 7f3d8c99bb)
This commit is contained in:
@@ -32,7 +32,9 @@ _status(CALENDAR_STATUS_INVITED), _rank(CALENDAR_RANK_PLAYER), _note("") { }
|
||||
|
||||
CalendarInvite::~CalendarInvite()
|
||||
{
|
||||
sCalendarMgr->FreeInviteId(_inviteId);
|
||||
// Free _inviteId only if it's a real invite and not just a pre-invite or guild announcement
|
||||
if (_inviteId != 0 && _eventId != 0)
|
||||
sCalendarMgr->FreeInviteId(_inviteId);
|
||||
}
|
||||
|
||||
CalendarEvent::~CalendarEvent()
|
||||
|
||||
Reference in New Issue
Block a user