Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Sub ObtenerExito(ByVal ExpGanada As Long, ByVal Mapa As Integer, X As Integer, Y As Integer)
- '***************************************************
- 'Author: Unknown
- 'Last Modification: 07/04/08
- 'Last Modification By: Marco Vanotti (MarKoxX)
- ' - 09/29/07 New formula for calculating the experience point of each user
- ' - 09/29/07 Experience is round to the biggest number less than that number
- ' - 09/29/07 Now experience is a real-number
- ' - 04/04/08 Ahora antes de calcular la experiencia a X usuario se fija si ese usuario existe (MarKoxX)
- ' - 07/04/08 New formula to calculate Experience for each user. (MarKoxX)
- '***************************************************
- 'Se produjo un evento que da experiencia en la wp referenciada
- Dim i As Integer
- Dim UI As Integer
- Dim expThisUser As Double
- 1 On Error GoTo ObtenerExito_Error
- ' ++ Fix asqueroso feo pero bueno xd
- 2 If (p_expTotal >= Get_ExpLvl(46)) Then
- 3 UI = p_members(1).UserIndex
- 4 If UI > 0 Then
- 5 Call WriteConsoleMsg(UI, "Has exedido el limite de exp en party. La party se ha disuelto.", FontTypeNames.FONTTYPE_PARTY)
- 6 Call SaleMiembro(UI)
- 7 Exit Sub
- 8 End If
- 9 End If
- 10 p_expTotal = p_expTotal + ExpGanada
- 11 For i = 1 To PARTY_MAXMEMBERS
- 12 UI = p_members(i).UserIndex
- 13 If UI > 0 Then
- ' ++ Si estoy solo en la party.
- 14 If p_members(i).bPorcentaje = 100 Then
- 15 expThisUser = ExpGanada
- 16 Else
- 17 expThisUser = Porcentaje(ExpGanada, p_members(i).bPorcentaje)
- 18 End If
- 19 If Mapa = UserList(UI).Pos.Map And UserList(UI).flags.Muerto = 0 Then
- 20 If Distance(UserList(UI).Pos.X, UserList(UI).Pos.Y, X, Y) <= PARTY_MAXDISTANCIA Then
- 21 p_members(i).Experiencia = p_members(i).Experiencia + expThisUser
- 22 If p_members(i).Experiencia < 0 Then
- 23 p_members(i).Experiencia = 0
- 24 End If
- 25 If PARTY_EXPERIENCIAPORGOLPE Then
- 26 UserList(UI).Stats.Exp = UserList(UI).Stats.Exp + Fix(expThisUser)
- 27 If UserList(UI).Stats.Exp > MAXEXP Then _
- UserList(UI).Stats.Exp = MAXEXP
- 28 Call CheckUserLevel(UI)
- 29 Call WriteUpdateUserStats(UI)
- 30 End If
- 31 End If
- 32 End If
- 33 End If
- 34 Next i
- 35 Exit Sub
- ObtenerExito_Error:
- 36 Call LogError("Error " & Err.Number & " (" & Err.description & ") in procedure ObtenerExito of Módulo de clase clsParty" & Erl & ".")
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement