Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[Bug Fix] Fixing a serious error in Party


Valentine90
 Share

Recommended Posts

**Sorry my english**

The Party system contains several serious errors:

1) You can accept invitation to anyone who has left the game;

2) The name of the new leader of the party is wrong;

3) When the party ends some members continues with a party that no longer exists;

4) Other errors.

**Open Server**

**1 -** In **modHandleData**, look for:

```
Sub HandleAcceptParty
```

**2 -** Below add:

```
If Not IsConnected(TempPlayer(index).partyInvite) Or Not IsPlaying(TempPlayer(index).partyInvite) Then

TempPlayer(index).partyInvite = 0

Exit Sub

End If
```

**3 -** In **modGameLogic**, look for:

```
Public Sub Party_PlayerLeave
```

**4 -** Replace:

```
PartyMsg partyNum, GetPlayerName(i) & " is now the party leader.", BrightBlue
```

**5 -** By:

```
PartyMsg partyNum, GetPlayerName(Party(partynum).Leader) & " is now the party leader.", BrightBlue
```

**6 -** Beneath of:

```
' remove from array

For i = 1 To MAX_PARTY_MEMBERS

If Party(partynum).Member(i) = index Then

Party(partynum).Member(i) = 0

Exit For

End If

Next
```

**7 -** Add:

```
TempPlayer(index).inParty = 0

TempPlayer(index).partyInvite = 0
```

**8 -** Beneath of:

```
For i = 1 To MAX_PARTY_MEMBERS

If Party(partyNum).Member(i) = index Then

Party(partyNum).Member(i) = 0

Exit For

End If

Next
```

**9 -** Add:

```
TempPlayer(index).inParty = 0

TempPlayer(index).partyInvite = 0
```

**10 -** Look for:

```
Public Sub Party_InviteAccept
```

**11 -** Replace:

```
Dim partynum As Long, i As Long
```

**12 -** By:

```
Dim partynum As Long, i As Long, x As Long
```

**13 -** Replace:

```
SendPartyVitals partyNum, targetPlayer
```

**14 -** By:

```
For x = 1 To MAX_PARTY_MEMBERS

If Party(partynum).Member(x) > 0 Then

SendPartyVitals partynum, Party(partynum).Member(x)

End If

Next
```

**15 -** Beneath of:

```
PlayerMsg targetPlayer, "Party is full.", BrightRed
```

**16 -** Add:

```
TempPlayer(targetPlayer).partyInvite = 0
```

**17 -** Look for:

```
Public Sub Party_ShareExp
```

**18 -** Beneath of:

```
Dim expShare As Long, leftOver As Long, i As Long, tmpIndex As Long
```

**19 -** Add:

```
If Party(partynum).MemberCount <= 0 Then Exit Sub
```

**Credits:**

Valentine
Link to comment
Share on other sites

  • 4 weeks later...
I have 2```
SendPartyVitals partyNum, targetPlayer
```

```

' send update to all - including new player

SendPartyUpdate partyNum

SendPartyVitals partyNum, targetPlayer

```

or

```

' create the party

Party(partyNum).MemberCount = 2

Party(partyNum).Leader = Index

Party(partyNum).Member(1) = Index

Party(partyNum).Member(2) = targetPlayer

SendPartyUpdate partyNum

SendPartyVitals partyNum, Index

SendPartyVitals partyNum, targetPlayer

```

hich I replace?
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...