mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[6903] Avoid DB access on player invite to channel.
This commit is contained in:
parent
d8be07eabc
commit
d9de56ed2c
3 changed files with 4 additions and 9 deletions
|
|
@ -626,7 +626,7 @@ void Channel::Invite(uint64 p, const char *newname)
|
||||||
SendToOne(&data, newp->GetGUID());
|
SendToOne(&data, newp->GetGUID());
|
||||||
data.clear();
|
data.clear();
|
||||||
}
|
}
|
||||||
MakePlayerInvited(&data, newp->GetGUID());
|
MakePlayerInvited(&data, newp->GetName());
|
||||||
SendToOne(&data, p);
|
SendToOne(&data, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -916,13 +916,8 @@ void Channel::MakeNotModerated(WorldPacket *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// done 0x1D
|
// done 0x1D
|
||||||
void Channel::MakePlayerInvited(WorldPacket *data, uint64 guid)
|
void Channel::MakePlayerInvited(WorldPacket *data, const std::string& name)
|
||||||
{
|
{
|
||||||
std::string name;
|
|
||||||
|
|
||||||
if(!objmgr.GetPlayerNameByGUID(guid, name) || name.empty())
|
|
||||||
return; // player name not found
|
|
||||||
|
|
||||||
MakeNotifyPacket(data, CHAT_PLAYER_INVITED_NOTICE);
|
MakeNotifyPacket(data, CHAT_PLAYER_INVITED_NOTICE);
|
||||||
*data << name;
|
*data << name;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@ class Channel
|
||||||
void MakeWrongFaction(WorldPacket *data); //? 0x1A
|
void MakeWrongFaction(WorldPacket *data); //? 0x1A
|
||||||
void MakeInvalidName(WorldPacket *data); //? 0x1B
|
void MakeInvalidName(WorldPacket *data); //? 0x1B
|
||||||
void MakeNotModerated(WorldPacket *data); //? 0x1C
|
void MakeNotModerated(WorldPacket *data); //? 0x1C
|
||||||
void MakePlayerInvited(WorldPacket *data, uint64 guid); //+ 0x1D
|
void MakePlayerInvited(WorldPacket *data, const std::string& name); //+ 0x1D
|
||||||
void MakePlayerInviteBanned(WorldPacket *data, uint64 guid); //? 0x1E
|
void MakePlayerInviteBanned(WorldPacket *data, uint64 guid); //? 0x1E
|
||||||
void MakeThrottled(WorldPacket *data); //? 0x1F
|
void MakeThrottled(WorldPacket *data); //? 0x1F
|
||||||
void MakeNotInArea(WorldPacket *data); //? 0x20
|
void MakeNotInArea(WorldPacket *data); //? 0x20
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "6902"
|
#define REVISION_NR "6903"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue