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) { unit.AddEffect(528, null); unit.AddSkillEffect(new AttackerAttr(unit), SkillEffectType.Buff, GameConfig.PvpBuffId); } else { Ghost ghost = unit as Ghost; if (ghost == null) { return; } if (ghost.IsMainPlayer()) { mMainGhost = ghost; mMainGhost.AddEffect(528, null); } else { mOtherGhost = ghost; } ghost.AddSkillEffect(new AttackerAttr(ghost), SkillEffectType.Buff, GameConfig.PvpBuffId); } }