MR-2: Auto-revert POS_FIGHTING after inactivity + Realtime character level updates + Macros removed

This commit is contained in:
Mind Rapist
2025-12-20 01:55:05 +02:00
parent a53600aebf
commit 47caa3e076
15 changed files with 60 additions and 202 deletions

View File

@@ -114,6 +114,9 @@ CHARACTER::CHARACTER()
m_stateIdle.Set(this, &CHARACTER::BeginStateEmpty, &CHARACTER::StateIdle, &CHARACTER::EndStateEmpty);
m_stateMove.Set(this, &CHARACTER::BeginStateEmpty, &CHARACTER::StateMove, &CHARACTER::EndStateEmpty);
m_stateBattle.Set(this, &CHARACTER::BeginStateEmpty, &CHARACTER::StateBattle, &CHARACTER::EndStateEmpty);
#ifdef FIX_POS_SYNC
m_stateSyncing.Set(this, &CHARACTER::BeginStateEmpty, &CHARACTER::StateSyncing, &CHARACTER::EndStateEmpty);
#endif
Initialize();
}
@@ -1009,10 +1012,8 @@ void CHARACTER::UpdatePacket()
{
if (GetSectree() == NULL) return;
#ifdef CHAR_SELECT_STATS_IMPROVEMENT
if (IsPC() && (!GetDesc() || !GetDesc()->GetCharacter()))
return;
#endif
TPacketGCCharacterUpdate pack;
TPacketGCCharacterUpdate pack2;
@@ -1400,7 +1401,6 @@ void CHARACTER::Disconnect(const char * c_pszReason)
if (GetDesc())
{
#ifdef CHAR_SELECT_STATS_IMPROVEMENT
PointsPacket();
packet_point_change pack;
@@ -1411,7 +1411,6 @@ void CHARACTER::Disconnect(const char * c_pszReason)
pack.amount = 0;
GetDesc()->Packet(&pack, sizeof(struct packet_point_change));
#endif
GetDesc()->BindCharacter(NULL);
// BindDesc(NULL);
}
@@ -1626,16 +1625,11 @@ void CHARACTER::PointsPacket()
pack.points[POINT_STAMINA] = GetStamina();
pack.points[POINT_MAX_STAMINA] = GetMaxStamina();
#ifdef CHAR_SELECT_STATS_IMPROVEMENT
for (int i = POINT_ST; i < POINT_IQ + 1; ++i)
pack.points[i] = GetRealPoint(i);
for (int i = POINT_IQ + 1; i < POINT_MAX_NUM; ++i)
pack.points[i] = GetPoint(i);
#else
for (int i = POINT_ST; i < POINT_MAX_NUM; ++i)
pack.points[i] = GetPoint(i);
#endif
GetDesc()->Packet(&pack, sizeof(TPacketGCPoints));
}
@@ -1813,15 +1807,9 @@ void CHARACTER::SetPlayerProto(const TPlayerTable * t)
ComputePoints();
#ifdef FIX_NEG_HP
SetHP(GetMaxHP());
SetSP(GetMaxSP());
SetStamina(GetMaxStamina());
#else
SetHP(t->hp);
SetSP(t->sp);
SetStamina(t->stamina);
#endif
//GM일때 보호모드
if (!test_server)