mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
[General] Disable automatic sync for PlayerJournal and PlayerFaction
Simplify PlayerFaction packets by removing BOTH action
This commit is contained in:
parent
6dde0ca9c9
commit
4e74910fdb
5 changed files with 5 additions and 11 deletions
|
@ -17,8 +17,6 @@ namespace mwmp
|
|||
{
|
||||
DEBUG_PRINTF(strPacketID.c_str());
|
||||
|
||||
packet.Send(true);
|
||||
|
||||
Script::Call<Script::CallbackIdentity("OnPlayerFaction")>(player.getId());
|
||||
}
|
||||
};
|
||||
|
|
|
@ -17,8 +17,6 @@ namespace mwmp
|
|||
{
|
||||
DEBUG_PRINTF(strPacketID.c_str());
|
||||
|
||||
packet.Send(true);
|
||||
|
||||
Script::Call<Script::CallbackIdentity("OnPlayerJournal")>(player.getId());
|
||||
}
|
||||
};
|
||||
|
|
|
@ -955,7 +955,7 @@ void LocalPlayer::setFactions()
|
|||
if (!ptrNpcStats.isInFaction(faction.factionId))
|
||||
ptrNpcStats.joinFaction(faction.factionId);
|
||||
|
||||
if (factionChanges.action == mwmp::FactionChanges::RANK || factionChanges.action == mwmp::FactionChanges::BOTH)
|
||||
if (factionChanges.action == mwmp::FactionChanges::RANK)
|
||||
{
|
||||
// While the faction rank is different in the packet than in the NpcStats,
|
||||
// adjust the NpcStats accordingly
|
||||
|
@ -967,8 +967,7 @@ void LocalPlayer::setFactions()
|
|||
ptrNpcStats.lowerRank(faction.factionId);
|
||||
}
|
||||
}
|
||||
|
||||
if (factionChanges.action == mwmp::FactionChanges::EXPULSION || factionChanges.action == mwmp::FactionChanges::BOTH)
|
||||
else if (factionChanges.action == mwmp::FactionChanges::EXPULSION)
|
||||
{
|
||||
// If the expelled state is different in the packet than in the NpcStats,
|
||||
// adjust the NpcStats accordingly
|
||||
|
|
|
@ -91,8 +91,7 @@ namespace mwmp
|
|||
enum FACTION_ACTION
|
||||
{
|
||||
RANK = 0,
|
||||
EXPULSION = 1,
|
||||
BOTH = 2
|
||||
EXPULSION = 1
|
||||
};
|
||||
|
||||
int action; // 0 - Rank, 1 - Expulsion state, 2 - Both
|
||||
|
|
|
@ -31,10 +31,10 @@ void PacketPlayerFaction::Packet(RakNet::BitStream *bs, bool send)
|
|||
|
||||
RW(faction.factionId, send, 1);
|
||||
|
||||
if (player->factionChanges.action == FactionChanges::BOTH || player->factionChanges.action == FactionChanges::RANK)
|
||||
if (player->factionChanges.action == FactionChanges::RANK)
|
||||
RW(faction.rank, send);
|
||||
|
||||
if (player->factionChanges.action == FactionChanges::BOTH || player->factionChanges.action == FactionChanges::EXPULSION)
|
||||
if (player->factionChanges.action == FactionChanges::EXPULSION)
|
||||
RW(faction.isExpelled, send);
|
||||
|
||||
if (!send)
|
||||
|
|
Loading…
Reference in a new issue