Hi there,
No offence for Frozen-In-Time, but i released a similar patch for my server [7693] which seem to be fully functional now.
Just few mofications of the core needed and no crash return on our test server (running for 1 month now). What we did :
When a group or raid is made, all the members of the group/raid takes the faction of their leader.
If group is disband or a member is removed, members take back their faction. Easy as 1-2-3.
Here is my branch : git://github.com/missproject/mangos.git interfactionpatch
http://github.com/missproject/mangos/tree/interfactionpatch
For those who wants the little changes :
------------------------------ src/game/Group.cpp ------------------------------
index e6e01aa..1e70bc5 100644
@@ -296,6 +296,16 @@ bool Group::AddMember(const uint64 &guid, const char* name)
player->SetDifficulty(m_difficulty);
player->SendDungeonDifficulty(true);
}
+ // Group Interfactions interactions (test)
+ if(sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
+ {
+ Group *group = player->GetGroup();
+ if(Player *leader = objmgr.GetPlayer(group->GetLeaderGUID()))
+ {
+ player->setFactionForRace(leader->getRace());
+ sLog.outDebug( "WORLD: Group Interfaction Interactions - Faction changed (AddMember)" );
+ }
+ }
}
player->SetGroupUpdateFlag(GROUP_UPDATE_FULL);
UpdatePlayerOutOfRange(player);
@@ -340,7 +350,12 @@ uint32 Group::RemoveMember(const uint64 &guid, const uint8 &method)
data << uint64(0) << uint64(0) << uint64(0);
player->GetSession()->SendPacket(&data);
}
-
+ // Restore original faction if needed
+ if(sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
+ {
+ player->setFactionForRace(player->getRace());
+ sLog.outDebug( "WORLD: Group Interfaction Interactions - Restore original faction (RemoveMember)" );
+ }
_homebindIfInstance(player);
}
@@ -411,6 +411,12 @@ void Group::Disband(bool hideDestroy)
player->SetOriginalGroup(NULL);
else
player->SetGroup(NULL);
+ // Restore original faction if needed
+ if(sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP))
+ {
+ player->setFactionForRace(player->getRace());
+ sLog.outDebug( "WORLD: Group Interfaction Interactions - Restore original faction (Disband)" );
+ }
}
// quest related GO state dependent from raid membership
Again, it's not for blaming or anything else, just if we can share each other knowledge, it could be a better patch.
Good Job FIT.