public static Boolean PollCollisionIcon(Obj targetObject) { Boolean result = false; if (EventHUD.CurrentHUD == MinigameHUD.MogTutorial) { return(result); } EventEngine instance = PersistenSingleton <EventEngine> .Instance; if (instance.gMode == 1) { Boolean flag = instance.GetIP((Int32)targetObject.sid, 3, targetObject.ebData) != instance.nil && 1 < targetObject.level; Boolean flag2 = instance.GetIP((Int32)targetObject.sid, 8, targetObject.ebData) != instance.nil && 1 < targetObject.level; if (flag && flag2) { EIcon.PollFIcon(2); result = true; } else if (flag && instance.IsActuallyTalkable(targetObject)) { EIcon.PollFIcon(1); result = true; } } else { Boolean flag = instance.GetIP((Int32)targetObject.sid, 2, targetObject.ebData) != instance.nil && 1 < targetObject.level; if (flag) { if (EMinigame.CheckBeachMinigame() && !EventCollision.IsWorldTrigger()) { EIcon.PollFIcon(4); } else { EIcon.PollFIcon(1); } result = true; } } return(result); }
public static void CollisionRequest(PosObj po) { Boolean flag = false; EventEngine instance = PersistenSingleton <EventEngine> .Instance; Int32 nil = instance.nil; Single nilFloat = instance.nilFloat; Obj obj; if (EventCollision.CheckNPCInput(po)) { if (instance.gMode != 3) { return; } obj = EventCollision.Collision(instance, po, 2, ref nilFloat); } else { obj = EventCollision.Collision(instance, po, 4, ref nilFloat); if (obj != null) { EventCollision.sSysAngle = EventCollision.CollisionAngle(po, obj); if (EventCollision.sSysAngle > -1024 && EventCollision.sSysAngle < 1024) { if (EventCollision.IsNPCTalkable(obj)) { flag = EIcon.PollCollisionIcon(obj); } if (!flag) { obj = EventCollision.Collision(instance, po, 2, ref nilFloat); } } else { obj = EventCollision.Collision(instance, po, 2, ref nilFloat); } } else { obj = EventCollision.Collision(instance, po, 2, ref nilFloat); if (instance.gMode == 3 && obj != null) { WMActor wmActor = ((Actor)po).wmActor; if (wmActor.ControlNo == 0) { flag = EIcon.PollCollisionIcon(obj); } } } } if (obj != null && EventCollision.CheckNPCPush((PosObj)obj)) { instance.Request(obj, 1, 2, false); } if (EventCollision.CheckQuadInput(po)) { return; } obj = instance.TreadQuad(po, 2); if (obj != null) { Boolean flag2 = EventCollision.CheckQuadPush(po, obj) && instance.Request(obj, 1, 2, false); if (flag2) { if (instance.GetIP((Int32)obj.sid, 8, obj.ebData) != instance.nil) { EIcon.PollFIcon(2); } else { Int16 fldMapNo = FF9StateSystem.Common.FF9.fldMapNo; if (fldMapNo == 2108) { if (EventCollision.CheckQuadTalk(po, obj)) { EIcon.PollFIcon(1); } } } } } obj = instance.TreadQuad(po, 4); if (obj != null && EventCollision.CheckQuadTalk(po, obj) && EventCollision.IsQuadTalkable(po, obj)) { EIcon.PollCollisionIcon(obj); } if (instance.gMode == 3 && obj == null) { if (EventCollision.IsChocoboWalkingOrFlyingInForestArea()) { EIcon.PollFIcon(1); } else if (!flag && EMinigame.CheckBeachMinigame()) { EIcon.PollFIcon(3); } } }