mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[9342] Fixed group creating :(
Also prevent not read tail packet spam in soem cases in group handlers.
This commit is contained in:
parent
c49771337c
commit
c2f8d39920
4 changed files with 51 additions and 42 deletions
|
|
@ -93,6 +93,8 @@ bool Group::Create(const uint64 &guid, const char * name)
|
|||
m_raidDifficulty = RAID_DIFFICULTY_10MAN_NORMAL;
|
||||
if(!isBGGroup())
|
||||
{
|
||||
m_Id = sObjectMgr.GenerateGroupId();
|
||||
|
||||
Player *leader = sObjectMgr.GetPlayer(guid);
|
||||
if(leader)
|
||||
{
|
||||
|
|
@ -116,10 +118,7 @@ bool Group::Create(const uint64 &guid, const char * name)
|
|||
return false;
|
||||
|
||||
if(!isBGGroup())
|
||||
{
|
||||
CharacterDatabase.CommitTransaction();
|
||||
m_Id = sObjectMgr.GenerateGroupId();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -438,7 +437,6 @@ void Group::Disband(bool hideDestroy)
|
|||
ResetInstances(INSTANCE_RESET_GROUP_DISBAND, true, NULL);
|
||||
}
|
||||
|
||||
m_Id = 0;
|
||||
m_leaderGuid = 0;
|
||||
m_leaderName = "";
|
||||
}
|
||||
|
|
@ -1218,8 +1216,6 @@ void Group::_setLeader(const uint64 &guid)
|
|||
CharacterDatabase.CommitTransaction();
|
||||
}
|
||||
|
||||
uint32 old_guidlow = GUID_LOPART(m_leaderGuid);
|
||||
|
||||
m_leaderGuid = slot->guid;
|
||||
m_leaderName = slot->name;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue