mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-30 17:58:16 +00:00
Fixed a zone crash related to numhits for spells.
Fixed a query related to group leaders logging in. Fixed a world crash related to attempting to join an adventure with Mercenaries.
This commit is contained in:
+11
-6
@@ -54,10 +54,10 @@ void Adventure::AddPlayer(std::string character_name, bool add_client_to_instanc
|
||||
{
|
||||
if(!PlayerExists(character_name))
|
||||
{
|
||||
int client_id = database.GetCharacterID(character_name.c_str());
|
||||
if(add_client_to_instance)
|
||||
int32 character_id = database.GetCharacterID(character_name.c_str());
|
||||
if(character_id && add_client_to_instance)
|
||||
{
|
||||
database.AddClientToInstance(instance_id, client_id);
|
||||
database.AddClientToInstance(instance_id, character_id);
|
||||
}
|
||||
players.push_back(character_name);
|
||||
}
|
||||
@@ -68,11 +68,16 @@ void Adventure::RemovePlayer(std::string character_name)
|
||||
std::list<std::string>::iterator iter = players.begin();
|
||||
while(iter != players.end())
|
||||
{
|
||||
|
||||
if((*iter).compare(character_name) == 0)
|
||||
{
|
||||
database.RemoveClientFromInstance(instance_id, database.GetCharacterID(character_name.c_str()));
|
||||
players.erase(iter);
|
||||
return;
|
||||
int32 character_id = database.GetCharacterID(character_name.c_str());
|
||||
if (character_id)
|
||||
{
|
||||
database.RemoveClientFromInstance(instance_id, character_id);
|
||||
players.erase(iter);
|
||||
return;
|
||||
}
|
||||
}
|
||||
++iter;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user