mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-22 13:09:41 +00:00
[Client] Send PlayerFaction packets when getting expelled from factions
This commit is contained in:
parent
d0ec5c61e2
commit
48ee8fd536
2 changed files with 13 additions and 2 deletions
|
@ -15,6 +15,7 @@
|
||||||
Include additional headers for multiplayer purposes
|
Include additional headers for multiplayer purposes
|
||||||
*/
|
*/
|
||||||
#include "../mwmp/Main.hpp"
|
#include "../mwmp/Main.hpp"
|
||||||
|
#include "../mwmp/LocalPlayer.hpp"
|
||||||
#include "../mwmp/PlayerList.hpp"
|
#include "../mwmp/PlayerList.hpp"
|
||||||
#include "../mwmp/CellController.hpp"
|
#include "../mwmp/CellController.hpp"
|
||||||
/*
|
/*
|
||||||
|
@ -1226,6 +1227,16 @@ namespace MWMechanics
|
||||||
const std::map<std::string, int>& playerRanks = player.getClass().getNpcStats(player).getFactionRanks();
|
const std::map<std::string, int>& playerRanks = player.getClass().getNpcStats(player).getFactionRanks();
|
||||||
if (playerRanks.find(Misc::StringUtils::lowerCase(factionID)) != playerRanks.end())
|
if (playerRanks.find(Misc::StringUtils::lowerCase(factionID)) != playerRanks.end())
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
Start of tes3mp addition
|
||||||
|
|
||||||
|
Send an ID_PLAYER_FACTION packet every time a player is expelled from a faction
|
||||||
|
*/
|
||||||
|
mwmp::Main::get().getLocalPlayer()->sendFaction(Misc::StringUtils::lowerCase(factionID), playerRanks.at(Misc::StringUtils::lowerCase(factionID)), true);
|
||||||
|
/*
|
||||||
|
End of tes3mp addition
|
||||||
|
*/
|
||||||
|
|
||||||
player.getClass().getNpcStats(player).expell(factionID);
|
player.getClass().getNpcStats(player).expell(factionID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1035,7 +1035,7 @@ namespace MWScript
|
||||||
|
|
||||||
Send an ID_PLAYER_FACTION packet every time a player is expelled from a faction
|
Send an ID_PLAYER_FACTION packet every time a player is expelled from a faction
|
||||||
*/
|
*/
|
||||||
mwmp::Main::get().getLocalPlayer()->sendFaction(factionID, player.getClass().getNpcStats(player).getFactionRanks().at(factionID), true);
|
mwmp::Main::get().getLocalPlayer()->sendFaction(Misc::StringUtils::lowerCase(factionID), player.getClass().getNpcStats(player).getFactionRanks().at(Misc::StringUtils::lowerCase(factionID)), true);
|
||||||
/*
|
/*
|
||||||
End of tes3mp addition
|
End of tes3mp addition
|
||||||
*/
|
*/
|
||||||
|
@ -1072,7 +1072,7 @@ namespace MWScript
|
||||||
Send an ID_PLAYER_FACTION packet every time a player is no longer expelled from a faction
|
Send an ID_PLAYER_FACTION packet every time a player is no longer expelled from a faction
|
||||||
*/
|
*/
|
||||||
if (factionID != "")
|
if (factionID != "")
|
||||||
mwmp::Main::get().getLocalPlayer()->sendFaction(factionID, player.getClass().getNpcStats(player).getFactionRanks().at(factionID), false);
|
mwmp::Main::get().getLocalPlayer()->sendFaction(Misc::StringUtils::lowerCase(factionID), player.getClass().getNpcStats(player).getFactionRanks().at(Misc::StringUtils::lowerCase(factionID)), false);
|
||||||
/*
|
/*
|
||||||
End of tes3mp addition
|
End of tes3mp addition
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue