|
@@ -131,6 +131,9 @@ namespace XmdsCommonServer.Plugin
|
|
|
//恢复MP状态,不可打断
|
|
|
public int mRecoverMPLeftTimes;
|
|
|
|
|
|
+ //PVP触发的玩家id
|
|
|
+ public string mPvpTriggerPlayerId;
|
|
|
+
|
|
|
//战斗状态变更通知.
|
|
|
public delegate void OnCombatChangeEvent(BattleStatus status);
|
|
|
public event OnCombatChangeEvent OnHandleCombatChangeEvent
|
|
@@ -1117,7 +1120,12 @@ namespace XmdsCommonServer.Plugin
|
|
|
|
|
|
protected virtual void ChangeCombatStateFromAtk(XmdsVirtual target)
|
|
|
{
|
|
|
- var s = target.IsPlayerUnit() ? BattleStatus.PVP : BattleStatus.PVE;
|
|
|
+ var s = BattleStatus.PVE;
|
|
|
+ if (target.IsPlayerUnit())
|
|
|
+ {
|
|
|
+ s = BattleStatus.PVP;
|
|
|
+ this.mPvpTriggerPlayerId = target.mUnit.PlayerUUID;
|
|
|
+ }
|
|
|
SetCombatState(s);
|
|
|
}
|
|
|
|