override public void OnSpriteModelLoaded(uint instanceid) { base.OnSpriteModelLoaded(instanceid); BattleUnit unit = FindObject(instanceid) as BattleUnit; if (unit == null) { return; } if (PlayerController.Instance.GetMainCropsControl() == instanceid || PlayerController.Instance.GetSubCropsControl() == instanceid || PlayerController.Instance.GetControl() == instanceid) { unit.AddEffect(528, null); unit.AddSkillEffect(new AttackerAttr(unit), SkillEffectType.Buff, GameConfig.PvpBuffId); } else { Ghost ghost = unit as Ghost; if (ghost == null) { return; } mGhost = ghost; ghost.AddSkillEffect(new AttackerAttr(ghost), SkillEffectType.Buff, GameConfig.PvpBuffId); } }