Ejemplo n.º 1
0
 public override float CalculateFinalSpeed(MobileParty mobileParty, float baseSpeed, StatExplainer explanation)
 {
     if (FollowData.getIsFollowActive())
     {
         if (mobileParty != null && mobileParty.Leader != null)
         {
             float unChangedPartySpeed = base.CalculateFinalSpeed(mobileParty, baseSpeed, explanation);
             if (!mobileParty.IsLeaderless && mobileParty.Leader.IsPlayerCharacter)
             {
                 if (FollowData.getIsFollowActive())
                 {
                     float followPartySpeed = FollowData.getFollowParty().LastCachedSpeed;
                     float distanceToParty  = CalculateDistanceToParty(mobileParty, FollowData.getFollowParty());
                     if (distanceToParty <= FollowData.slowdownThreshold)
                     {
                         return(followPartySpeed * (distanceToParty / FollowData.slowdownThreshold));
                     }
                     else
                     {
                         return(base.CalculateFinalSpeed(mobileParty, baseSpeed, explanation));
                     }
                 }
                 return(unChangedPartySpeed);
             }
             return(unChangedPartySpeed);
         }
         return(base.CalculateFinalSpeed(mobileParty, baseSpeed, explanation));
     }
     return(base.CalculateFinalSpeed(mobileParty, baseSpeed, explanation));
 }
Ejemplo n.º 2
0
 private void checkIfFollowPartyStillOnMap()
 {
     if (FollowData.getFollowParty() != null)
     {
         if (FollowData.getFollowParty().IsWaiting())
         {
             FollowData.stopFollowing();
         }
     }
 }