12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- using CommonAI.Data;
- using CommonAI.Zone;
- using CommonAI.Zone.Formula;
- using CommonAI.Zone.Helper;
- using CommonAI.Zone.Instance;
- using CommonLang.Log;
- using CommonLang.Vector;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using static CommonAI.ZoneClient.ClientStruct;
- namespace CommonAI.ZoneServer.JSGModule
- {
- public class JSGHackerModule
- {
- protected static readonly Logger log = LoggerFactory.GetLogger("JSGHackerModule");
- public static void OnPlayerKillMonster(InstanceUnit attacker, InstanceUnit monster)
- {
- #if JSGProfile
- try
- {
- InstancePlayer player = (InstancePlayer)(attacker.IsPlayer ? attacker : attacker.Virtual.GetMasterUnit());
- if (player == null)
- {
- log.Info("OnPlayerKillMonster player not exist:" + attacker.PlayerUUID + ", " + attacker.Info.ID + ", SceneId:" + attacker.Parent.GetSceneID());
- return;
- }
- UnitSimpleProp simpleProp = player.Virtual.GetSimpleProp();
-
- log.Info("--------OnPlayerKillMonster print start:" + player.PlayerUUID + ", " + attacker.Parent.GetSceneID());
- log.Info("当前血:" + simpleProp.mCurHp + ", 攻防血" + simpleProp.mAtk + ", " + simpleProp.mDef + ", " + simpleProp.mMaxHP + ", 妖:" + simpleProp.mMonsterAtk + ", " + simpleProp.mMonsterDef);
- UnitBuffStatus[] buffStatus = player.GetCurrentBuffStatus();
- if(buffStatus != null)
- {
- foreach(UnitBuffStatus buffItem in buffStatus)
- {
- log.Info("玩家buff:" + buffItem.ToString());
- }
- }
- }
- catch(Exception e)
- {
- log.Warn("OnPlayerKillMonster catch:", e);
- }
- #endif
- }
- }
- }
|