diff options
Diffstat (limited to 'reference')
| -rw-r--r-- | reference/game.c | 940 |
1 files changed, 0 insertions, 940 deletions
diff --git a/reference/game.c b/reference/game.c index 6b71785..8baf67a 100644 --- a/reference/game.c +++ b/reference/game.c @@ -18375,816 +18375,6 @@ void __static_initialization_and_destruction_0(int __initialize_p,int __priority return;
}
-TParty * GetParty(ulong Leader)
-
-{
- TParty *pTVar1;
- int i;
- int i_00;
-
- i_00 = 0;
- if (0 < Parties) {
- do {
- pTVar1 = vector<TParty>::operator()(&Party,i_00);
- if (pTVar1->Leader == Leader) {
- pTVar1 = vector<TParty>::operator()(&Party,i_00);
- return pTVar1;
- }
- i_00 = i_00 + 1;
- } while (i_00 < Parties);
- }
- return (TParty *)0x0;
-}
-
-
-
-bool IsInvitedToParty(ulong Guest,ulong Host)
-
-{
- ulong *puVar1;
- int i;
- int iVar2;
- TParty *pTVar3;
-
- iVar2 = 0;
- if (0 < Parties) {
- do {
- pTVar3 = vector<TParty>::operator()(&Party,iVar2);
- if (pTVar3->Leader == Host) {
- pTVar3 = vector<TParty>::operator()(&Party,iVar2);
- goto LAB_0809b6b8;
- }
- iVar2 = iVar2 + 1;
- } while (iVar2 < Parties);
- }
- pTVar3 = (TParty *)0x0;
-LAB_0809b6b8:
- if ((pTVar3 != (TParty *)0x0) && (iVar2 = 0, 0 < pTVar3->InvitedPlayers)) {
- do {
- puVar1 = vector<>::operator()(&pTVar3->InvitedPlayer,iVar2);
- if (Guest == *puVar1) {
- return true;
- }
- iVar2 = iVar2 + 1;
- } while (iVar2 < pTVar3->InvitedPlayers);
- }
- return false;
-}
-
-
-
-// WARNING: Variable defined which should be unmapped: leader
-
-void DisbandParty(ulong Leader)
-
-{
- vector<> *this;
- TPlayer *pl;
- TPlayer *pTVar1;
- ulong *puVar2;
- TPlayer *pTVar3;
- TParty *pTVar4;
- int i;
- int iVar5;
- int iVar6;
- int iVar7;
- TPlayer *pl_1;
- int local_1c;
- int i_2;
- TPlayer *leader;
-
- iVar5 = 0;
- pTVar1 = GetPlayer(Leader);
- if (0 < Parties) {
- do {
- pTVar4 = vector<TParty>::operator()(&Party,iVar5);
- if (pTVar4->Leader == Leader) {
- i_2 = (int)vector<TParty>::operator()(&Party,iVar5);
- goto LAB_0809b76c;
- }
- iVar5 = iVar5 + 1;
- } while (iVar5 < Parties);
- }
- i_2 = 0;
-LAB_0809b76c:
- if (i_2 == 0) {
- error(&DAT_08100dc0,Leader);
- }
- else {
- iVar6 = 0;
- iVar5 = *(int *)(i_2 + 0x24);
- if (0 < iVar5) {
- do {
- puVar2 = vector<>::operator()((vector<> *)(i_2 + 4),iVar6);
- pTVar3 = GetPlayer(*puVar2);
- if (pTVar3 != (TPlayer *)0x0) {
- TPlayer::LeaveParty(pTVar3);
- }
- iVar6 = iVar6 + 1;
- iVar5 = *(int *)(i_2 + 0x24);
- } while (iVar6 < iVar5);
- }
- *(undefined4 *)i_2 = 0;
- local_1c = 0;
- if (0 < iVar5) {
- this = (vector<> *)(i_2 + 4);
- do {
- puVar2 = vector<>::operator()(this,local_1c);
- pTVar3 = GetPlayer(*puVar2);
- if (pTVar3 == (TPlayer *)0x0) {
- iVar5 = *(int *)(i_2 + 0x24);
- }
- else {
- SendMessage((pTVar3->super_TCreature).Connection,0x16,
- "Your party has been disbanded.");
- iVar5 = *(int *)(i_2 + 0x24);
- iVar6 = 0;
- if (0 < iVar5) {
- do {
- puVar2 = vector<>::operator()(this,iVar6);
- SendCreatureParty((pTVar3->super_TCreature).Connection,*puVar2);
- iVar7 = iVar6 + 1;
- puVar2 = vector<>::operator()(this,iVar6);
- SendCreatureSkull((pTVar3->super_TCreature).Connection,*puVar2);
- iVar5 = *(int *)(i_2 + 0x24);
- iVar6 = iVar7;
- } while (iVar7 < iVar5);
- }
- }
- local_1c = local_1c + 1;
- } while (local_1c < iVar5);
- }
- if ((pTVar1 != (TPlayer *)0x0) && (0 < *(int *)(i_2 + 0x48))) {
- iVar5 = 0;
- do {
- puVar2 = vector<>::operator()((vector<> *)(i_2 + 0x28),iVar5);
- pTVar3 = GetPlayer(*puVar2);
- if (pTVar3 != (TPlayer *)0x0) {
- SendCreatureParty((pTVar3->super_TCreature).Connection,Leader);
- SendCreatureParty((pTVar1->super_TCreature).Connection,
- (pTVar3->super_TCreature).ID);
- }
- iVar5 = iVar5 + 1;
- } while (iVar5 < *(int *)(i_2 + 0x48));
- }
- }
- return;
-}
-
-
-
-// WARNING: Variable defined which should be unmapped: Guest_local
-
-void InviteToParty(ulong Host,ulong Guest)
-
-{
- TPlayer *this;
- TPlayer *this_00;
- ulong uVar1;
- TParty *pTVar2;
- ulong *puVar3;
- char *pcVar4;
- TConnection *Connection;
- TParty *P;
- int iVar5;
- int i;
- TPlayer *host;
- vector<> *local_20;
- TParty *local_1c;
- TPlayer *guest;
- ulong Guest_local;
-
- if (Host != Guest) {
- this = GetPlayer(Host);
- if (this == (TPlayer *)0x0) {
- Host = (ulong)s_InviteToParty__Einladender_Spiel_08100ec0;
-LAB_0809bd08:
- error((char *)Host);
- return;
- }
- this_00 = GetPlayer(Guest);
- if (this_00 == (TPlayer *)0x0) {
- SendResult((this->super_TCreature).Connection,PLAYERNOTONLINE);
- return;
- }
- uVar1 = TPlayer::GetPartyLeader(this,true);
- if (uVar1 == 0) {
- uVar1 = TPlayer::GetPartyLeader(this_00,true);
- if (uVar1 == 0) {
- iVar5 = 0;
- if (0 < Parties) {
- do {
- pTVar2 = vector<TParty>::operator()(&Party,iVar5);
- if (pTVar2->Leader == 0) {
- pTVar2 = vector<TParty>::operator()(&Party,iVar5);
- goto LAB_0809b9e5;
- }
- iVar5 = iVar5 + 1;
- } while (iVar5 < Parties);
- }
- pTVar2 = (TParty *)0x0;
-LAB_0809b9e5:
- if (pTVar2 == (TParty *)0x0) {
- pTVar2 = vector<TParty>::operator()(&Party,Parties);
- Parties = Parties + 1;
- }
- pTVar2->Leader = Host;
- puVar3 = vector<>::operator()(&pTVar2->Member,0);
- *puVar3 = Host;
- pTVar2->Members = 1;
- puVar3 = vector<>::operator()(&pTVar2->InvitedPlayer,0);
- *puVar3 = Guest;
- pTVar2->InvitedPlayers = 1;
- TPlayer::JoinParty(this,Host);
- SendMessage((this->super_TCreature).Connection,0x16,"%s has been invited.",
- (this_00->super_TCreature).Name);
- pcVar4 = "his";
- if ((this->super_TCreature).Sex != 1) {
- pcVar4 = "her";
- }
- SendMessage((this_00->super_TCreature).Connection,0x16,"%s invites you to %s party."
- ,(this->super_TCreature).Name,pcVar4);
- SendCreatureParty((this->super_TCreature).Connection,Host);
- SendCreatureSkull((this->super_TCreature).Connection,Host);
-LAB_0809bac9:
- SendCreatureParty((this->super_TCreature).Connection,Guest);
- SendCreatureParty((this_00->super_TCreature).Connection,Host);
- return;
- }
- Connection = (this->super_TCreature).Connection;
- pcVar4 = "%s is already member of a party.";
-LAB_0809bb73:
- SendMessage(Connection,0x16,pcVar4,(this_00->super_TCreature).Name);
- }
- else {
- uVar1 = TPlayer::GetPartyLeader(this,false);
- if (uVar1 == Host) {
- uVar1 = TPlayer::GetPartyLeader(this_00,true);
- if (uVar1 == 0) {
- iVar5 = 0;
- if (0 < Parties) {
- do {
- pTVar2 = vector<TParty>::operator()(&Party,iVar5);
- if (pTVar2->Leader == Host) {
- local_1c = vector<TParty>::operator()(&Party,iVar5);
- goto LAB_0809bbfc;
- }
- iVar5 = iVar5 + 1;
- } while (iVar5 < Parties);
- }
- local_1c = (TParty *)0x0;
-LAB_0809bbfc:
- if (local_1c == (TParty *)0x0) {
- Host = (ulong)&DAT_08100e40;
- goto LAB_0809bd08;
- }
- i = 0;
- iVar5 = local_1c->InvitedPlayers;
- if (0 < iVar5) {
- do {
- puVar3 = vector<>::operator()(&local_1c->InvitedPlayer,i);
- if (*puVar3 == Guest) {
- Connection = (this->super_TCreature).Connection;
- pcVar4 = "%s has already been invited.";
- goto LAB_0809bb73;
- }
- i = i + 1;
- iVar5 = local_1c->InvitedPlayers;
- } while (i < iVar5);
- }
- local_20 = &local_1c->InvitedPlayer;
- puVar3 = vector<>::operator()(local_20,iVar5);
- *puVar3 = Guest;
- local_1c->InvitedPlayers = local_1c->InvitedPlayers + 1;
- SendMessage((this->super_TCreature).Connection,0x16,"%s has been invited.",
- (this_00->super_TCreature).Name);
- pcVar4 = "his";
- if ((this->super_TCreature).Sex != 1) {
- pcVar4 = "her";
- }
- SendMessage((this_00->super_TCreature).Connection,0x16,
- "%s invites you to %s party.",(this->super_TCreature).Name,pcVar4);
- goto LAB_0809bac9;
- }
- pcVar4 = "your";
- uVar1 = TPlayer::GetPartyLeader(this_00,true);
- if (uVar1 != Host) {
- pcVar4 = "a";
- }
- SendMessage((this->super_TCreature).Connection,0x16,
- "%s is already member of %s party.",(this_00->super_TCreature).Name,
- pcVar4);
- }
- else {
- SendMessage((this->super_TCreature).Connection,0x16,"You may not invite players.");
- }
- }
- }
- return;
-}
-
-
-
-// WARNING: Variable defined which should be unmapped: Host_local
-
-void RevokeInvitation(ulong Host,ulong Guest)
-
-{
- TPlayer *this;
- TPlayer *pTVar1;
- ulong uVar2;
- TConnection *Connection;
- ulong *puVar3;
- ulong *puVar4;
- TParty *pTVar5;
- int Position;
- int iVar6;
- int i;
- int i_1;
- int iVar7;
- char *pcVar8;
- TParty *local_24;
- TPlayer *guest;
- TPlayer *host;
- ulong Guest_local;
- ulong Host_local;
-
- if (Host == Guest) {
- return;
- }
- this = GetPlayer(Host);
- if (this == (TPlayer *)0x0) {
- Host = (ulong)s_RevokeInvitation__Einladender_Sp_08100fc0;
-LAB_0809c05e:
- error((char *)Host);
- return;
- }
- pTVar1 = GetPlayer(Guest);
- uVar2 = TPlayer::GetPartyLeader(this,false);
- if (uVar2 == Host) {
- iVar6 = 0;
- if (0 < Parties) {
- do {
- pTVar5 = vector<TParty>::operator()(&Party,iVar6);
- if (pTVar5->Leader == Host) {
- local_24 = vector<TParty>::operator()(&Party,iVar6);
- goto LAB_0809be65;
- }
- iVar6 = iVar6 + 1;
- } while (iVar6 < Parties);
- }
- local_24 = (TParty *)0x0;
-LAB_0809be65:
- if (local_24 == (TParty *)0x0) {
- Host = (ulong)&DAT_08100f80;
- goto LAB_0809c05e;
- }
- i = -1;
- iVar6 = local_24->InvitedPlayers;
- if (0 < iVar6) {
- iVar7 = 0;
- do {
- puVar3 = vector<>::operator()(&local_24->InvitedPlayer,iVar7);
- iVar6 = local_24->InvitedPlayers;
- if (*puVar3 == Guest) {
- i = iVar7;
- }
- iVar7 = iVar7 + 1;
- } while (iVar7 < iVar6);
- }
- if (i != -1) {
- if (i < iVar6 + -1) {
- do {
- iVar7 = i + 1;
- puVar3 = vector<>::operator()(&local_24->InvitedPlayer,i);
- puVar4 = vector<>::operator()(&local_24->InvitedPlayer,iVar7);
- *puVar3 = *puVar4;
- iVar6 = local_24->InvitedPlayers;
- i = iVar7;
- } while (iVar7 < iVar6 + -1);
- }
- local_24->InvitedPlayers = iVar6 + -1;
- if (pTVar1 == (TPlayer *)0x0) {
- SendMessage((this->super_TCreature).Connection,0x16,"Invitation has been revoked.");
- }
- else {
- SendMessage((this->super_TCreature).Connection,0x16,
- "Invitation for %s has been revoked.",(pTVar1->super_TCreature).Name);
- pcVar8 = "his";
- if ((this->super_TCreature).Sex != 1) {
- pcVar8 = "her";
- }
- SendMessage((pTVar1->super_TCreature).Connection,0x16,
- "%s has revoked %s invitation.",(this->super_TCreature).Name,pcVar8);
- SendCreatureParty((this->super_TCreature).Connection,Guest);
- SendCreatureParty((pTVar1->super_TCreature).Connection,Host);
- }
- if (local_24->Members != 1) {
- return;
- }
- if (local_24->InvitedPlayers != 0) {
- return;
- }
- DisbandParty(Host);
- return;
- }
- if (pTVar1 != (TPlayer *)0x0) {
- SendMessage((this->super_TCreature).Connection,0x16,"%s has not been invited.",
- (pTVar1->super_TCreature).Name);
- return;
- }
- Connection = (this->super_TCreature).Connection;
- pcVar8 = "This player has not been invited.";
- }
- else {
- Connection = (this->super_TCreature).Connection;
- pcVar8 = "You may not invite players.";
- }
- SendMessage(Connection,0x16,pcVar8);
- return;
-}
-
-
-
-// WARNING: Variable defined which should be unmapped: Guest_local
-
-void JoinParty(ulong Guest,ulong Host)
-
-{
- vector<> *this;
- TPlayer *this_00;
- TPlayer *pTVar1;
- ulong uVar2;
- ulong *puVar3;
- ulong *puVar4;
- ulong uVar5;
- int i;
- int iVar6;
- int i_2;
- char *pcVar7;
- TParty *pTVar8;
- TConnection *pTVar9;
- char *Text;
- int local_24;
- int Position;
- TPlayer *host;
- TPlayer *guest;
- ulong Host_local;
- ulong Guest_local;
-
- if (Guest != Host) {
- this_00 = GetPlayer(Guest);
- if (this_00 == (TPlayer *)0x0) {
- error("JoinParty: Eingeladener Spieler %lu existiert nicht.\n");
- return;
- }
- pTVar1 = GetPlayer(Host);
- if (pTVar1 == (TPlayer *)0x0) {
- SendResult((this_00->super_TCreature).Connection,PLAYERNOTONLINE);
- return;
- }
- uVar2 = TPlayer::GetPartyLeader(this_00,true);
- if (uVar2 == 0) {
- iVar6 = 0;
- if (0 < Parties) {
- do {
- pTVar8 = vector<TParty>::operator()(&Party,iVar6);
- if (pTVar8->Leader == Host) {
- pTVar8 = vector<TParty>::operator()(&Party,iVar6);
- goto LAB_0809c131;
- }
- iVar6 = iVar6 + 1;
- } while (iVar6 < Parties);
- }
- pTVar8 = (TParty *)0x0;
-LAB_0809c131:
- local_24 = -1;
- if ((pTVar8 != (TParty *)0x0) && (iVar6 = 0, 0 < pTVar8->InvitedPlayers)) {
- do {
- puVar3 = vector<>::operator()(&pTVar8->InvitedPlayer,iVar6);
- if (*puVar3 == Guest) {
- local_24 = iVar6;
- }
- iVar6 = iVar6 + 1;
- } while (iVar6 < pTVar8->InvitedPlayers);
- }
- if (local_24 != -1) {
- this = &pTVar8->Member;
- puVar3 = vector<>::operator()(this,pTVar8->Members);
- *puVar3 = Guest;
- pTVar8->Members = pTVar8->Members + 1;
- pTVar8->InvitedPlayers = pTVar8->InvitedPlayers + -1;
- puVar3 = vector<>::operator()(&pTVar8->InvitedPlayer,local_24);
- puVar4 = vector<>::operator()(&pTVar8->InvitedPlayer,pTVar8->InvitedPlayers);
- *puVar3 = *puVar4;
- TPlayer::JoinParty(this_00,Host);
- SendMessage((this_00->super_TCreature).Connection,0x16,
- "You have joined %s\'s party.",(pTVar1->super_TCreature).Name);
- iVar6 = 0;
- SendCreatureParty((this_00->super_TCreature).Connection,Guest);
- SendCreatureSkull((this_00->super_TCreature).Connection,Guest);
- if (pTVar8->Members < 1) {
- return;
- }
- do {
- puVar3 = vector<>::operator()(this,iVar6);
- if (*puVar3 != Guest) {
- pTVar9 = (this_00->super_TCreature).Connection;
- puVar3 = vector<>::operator()(this,iVar6);
- SendCreatureParty(pTVar9,*puVar3);
- pTVar9 = (this_00->super_TCreature).Connection;
- puVar3 = vector<>::operator()(this,iVar6);
- SendCreatureSkull(pTVar9,*puVar3);
- puVar3 = vector<>::operator()(this,iVar6);
- pTVar1 = GetPlayer(*puVar3);
- if (pTVar1 != (TPlayer *)0x0) {
- SendMessage((pTVar1->super_TCreature).Connection,0x16,
- "%s has joined the party.",(this_00->super_TCreature).Name);
- SendCreatureParty((pTVar1->super_TCreature).Connection,Guest);
- SendCreatureSkull((pTVar1->super_TCreature).Connection,Guest);
- }
- }
- iVar6 = iVar6 + 1;
- } while (iVar6 < pTVar8->Members);
- return;
- }
- pTVar9 = (this_00->super_TCreature).Connection;
- pcVar7 = (pTVar1->super_TCreature).Name;
- Text = "%s has not invited you.";
- }
- else {
- pcVar7 = "this";
- uVar2 = TPlayer::GetPartyLeader(this_00,true);
- uVar5 = TPlayer::GetPartyLeader(pTVar1,true);
- if (uVar2 != uVar5) {
- pcVar7 = "a";
- }
- pTVar9 = (this_00->super_TCreature).Connection;
- Text = "You are already member of %s party.";
- }
- SendMessage(pTVar9,0x16,Text,pcVar7);
- }
- return;
-}
-
-
-
-// WARNING: Variable defined which should be unmapped: oldLeader
-
-void PassLeadership(ulong OldLeader,ulong NewLeader)
-
-{
- TPlayer *pl;
- TPlayer *this;
- TPlayer *pTVar1;
- ulong uVar2;
- ulong *puVar3;
- TPlayer *pTVar4;
- TParty *pTVar5;
- int i;
- int iVar6;
- int iVar7;
- int InvitedPlayers;
- int i_2;
- TPlayer *newLeader;
- TPlayer *oldLeader;
-
- if (OldLeader != NewLeader) {
- this = GetPlayer(OldLeader);
- if (this == (TPlayer *)0x0) {
- OldLeader = (ulong)&DAT_08101160;
-LAB_0809c6c4:
- error((char *)OldLeader);
- return;
- }
- pTVar1 = GetPlayer(NewLeader);
- if (pTVar1 == (TPlayer *)0x0) {
- SendResult((this->super_TCreature).Connection,PLAYERNOTONLINE);
- return;
- }
- uVar2 = TPlayer::GetPartyLeader(this,false);
- if (uVar2 == OldLeader) {
- uVar2 = TPlayer::GetPartyLeader(pTVar1,false);
- if (uVar2 == OldLeader) {
- iVar6 = 0;
- if (0 < Parties) {
- do {
- pTVar5 = vector<TParty>::operator()(&Party,iVar6);
- if (pTVar5->Leader == OldLeader) {
- i_2 = (int)vector<TParty>::operator()(&Party,iVar6);
- goto LAB_0809c51b;
- }
- iVar6 = iVar6 + 1;
- } while (iVar6 < Parties);
- }
- i_2 = 0;
-LAB_0809c51b:
- if (i_2 == 0) {
- OldLeader = (ulong)&DAT_08101120;
- goto LAB_0809c6c4;
- }
- iVar7 = 0;
- iVar6 = *(int *)(i_2 + 0x24);
- *(ulong *)i_2 = NewLeader;
- if (0 < iVar6) {
- do {
- puVar3 = vector<>::operator()((vector<> *)(i_2 + 4),iVar7);
- pTVar4 = GetPlayer(*puVar3);
- if (pTVar4 != (TPlayer *)0x0) {
- TPlayer::JoinParty(pTVar4,NewLeader);
- }
- iVar7 = iVar7 + 1;
- iVar6 = *(int *)(i_2 + 0x24);
- } while (iVar7 < iVar6);
- }
- InvitedPlayers = 0;
- if (0 < iVar6) {
- do {
- puVar3 = vector<>::operator()((vector<> *)(i_2 + 4),InvitedPlayers);
- pTVar4 = GetPlayer(*puVar3);
- if (pTVar4 != (TPlayer *)0x0) {
- if (pTVar4 == pTVar1) {
- SendMessage((pTVar4->super_TCreature).Connection,0x16,
- "You are now leader of your party.");
- }
- else {
- SendMessage((pTVar4->super_TCreature).Connection,0x16,
- "%s is now leader of your party.",
- (pTVar1->super_TCreature).Name);
- }
- SendCreatureParty((pTVar4->super_TCreature).Connection,OldLeader);
- SendCreatureParty((pTVar4->super_TCreature).Connection,NewLeader);
- }
- InvitedPlayers = InvitedPlayers + 1;
- } while (InvitedPlayers < *(int *)(i_2 + 0x24));
- }
- iVar6 = *(int *)(i_2 + 0x48);
- iVar7 = 0;
- *(undefined4 *)(i_2 + 0x48) = 0;
- if (0 < iVar6) {
- do {
- puVar3 = vector<>::operator()((vector<> *)(i_2 + 0x28),iVar7);
- pTVar1 = GetPlayer(*puVar3);
- if (pTVar1 != (TPlayer *)0x0) {
- SendCreatureParty((pTVar1->super_TCreature).Connection,OldLeader);
- SendCreatureParty((this->super_TCreature).Connection,
- (pTVar1->super_TCreature).ID);
- }
- iVar7 = iVar7 + 1;
- } while (iVar7 < iVar6);
- }
- }
- else {
- SendMessage((this->super_TCreature).Connection,0x16,
- "%s is not member of your party.",(pTVar1->super_TCreature).Name);
- }
- }
- else {
- SendMessage((this->super_TCreature).Connection,0x16,"You are not leader of a party.");
- }
- }
- return;
-}
-
-
-
-// WARNING: Variable defined which should be unmapped: Member_local
-
-void LeaveParty(ulong Member,bool Forced)
-
-{
- vector<> *this;
- TConnection *pTVar1;
- ulong NewLeader;
- TPlayer *this_00;
- ulong uVar2;
- ulong *puVar3;
- ulong *puVar4;
- TPlayer *pTVar5;
- TParty *pTVar6;
- int Position;
- int iVar7;
- int i;
- int i_1;
- int iVar8;
- TParty *local_20;
- TPlayer *member;
- bool Forced_local;
- ulong Member_local;
-
- this_00 = GetPlayer(Member);
- if (this_00 == (TPlayer *)0x0) {
- Member = (ulong)s_LeaveParty__Mitglied_existiert_n_081012c0;
- }
- else {
- uVar2 = TPlayer::GetPartyLeader(this_00,false);
- if (uVar2 != 0) {
- if ((Forced) || ((this_00->super_TCreature).EarliestLogoutRound <= RoundNr)) {
- iVar7 = 0;
- uVar2 = TPlayer::GetPartyLeader(this_00,false);
- if (0 < Parties) {
- do {
- pTVar6 = vector<TParty>::operator()(&Party,iVar7);
- if (pTVar6->Leader == uVar2) {
- local_20 = vector<TParty>::operator()(&Party,iVar7);
- goto LAB_0809c7c8;
- }
- iVar7 = iVar7 + 1;
- } while (iVar7 < Parties);
- }
- local_20 = (TParty *)0x0;
-LAB_0809c7c8:
- if (local_20 == (TParty *)0x0) {
- TPlayer::GetPartyLeader(this_00,false);
- error(&DAT_081011e0);
- return;
- }
- iVar7 = local_20->Members;
- if ((iVar7 == 1) || ((iVar7 == 2 && (local_20->InvitedPlayers == 0)))) {
- DisbandParty(local_20->Leader);
- return;
- }
- if (local_20->Leader == Member) {
- puVar3 = vector<>::operator()(&local_20->Member,0);
- uVar2 = *puVar3;
- if (uVar2 == Member) {
- puVar3 = vector<>::operator()(&local_20->Member,1);
- uVar2 = *puVar3;
- }
- PassLeadership(Member,uVar2);
- iVar7 = local_20->Members;
- }
- i = -1;
- if (0 < iVar7) {
- iVar8 = 0;
- do {
- puVar3 = vector<>::operator()(&local_20->Member,iVar8);
- iVar7 = local_20->Members;
- if (*puVar3 == Member) {
- i = iVar8;
- }
- iVar8 = iVar8 + 1;
- } while (iVar8 < iVar7);
- }
- if (i == -1) {
- Member = (ulong)s_LeaveParty__Mitglied_nicht_gefun_081011a0;
- goto LAB_0809c9e0;
- }
- if (i < iVar7 + -1) {
- do {
- iVar8 = i + 1;
- puVar3 = vector<>::operator()(&local_20->Member,i);
- puVar4 = vector<>::operator()(&local_20->Member,iVar8);
- *puVar3 = *puVar4;
- iVar7 = local_20->Members;
- i = iVar8;
- } while (iVar8 < iVar7 + -1);
- }
- local_20->Members = iVar7 + -1;
- TPlayer::LeaveParty(this_00);
- if (!Forced) {
- SendMessage((this_00->super_TCreature).Connection,0x16,
- "You have left the party.");
- }
- SendCreatureParty((this_00->super_TCreature).Connection,Member);
- SendCreatureSkull((this_00->super_TCreature).Connection,Member);
- if (0 < local_20->Members) {
- this = &local_20->Member;
- iVar7 = 0;
- do {
- pTVar1 = (this_00->super_TCreature).Connection;
- puVar3 = vector<>::operator()(this,iVar7);
- SendCreatureParty(pTVar1,*puVar3);
- pTVar1 = (this_00->super_TCreature).Connection;
- puVar3 = vector<>::operator()(this,iVar7);
- SendCreatureSkull(pTVar1,*puVar3);
- puVar3 = vector<>::operator()(this,iVar7);
- pTVar5 = GetPlayer(*puVar3);
- if (pTVar5 != (TPlayer *)0x0) {
- SendMessage((pTVar5->super_TCreature).Connection,0x16,
- "%s has left the party.",(this_00->super_TCreature).Name);
- SendCreatureParty((pTVar5->super_TCreature).Connection,Member);
- SendCreatureSkull((pTVar5->super_TCreature).Connection,Member);
- }
- iVar7 = iVar7 + 1;
- } while (iVar7 < local_20->Members);
- }
- }
- else {
- SendMessage((this_00->super_TCreature).Connection,0x16,
- "You may not leave your party during or immediately after a fight!");
- }
- return;
- }
- Member = (ulong)s_LeaveParty__Spieler_ist_kein_Mit_08101280;
- }
-LAB_0809c9e0:
- error((char *)Member);
- return;
-}
-
-
-
void __tcf_0(void *param_1)
{
@@ -19288,136 +18478,6 @@ void _GLOBAL__I_Channel(void) return;
}
-
-
-// DWARF original prototype: void TChannel(TChannel * this)
-
-void __thiscall TChannel::TChannel(TChannel *this)
-
-{
- vector<>::vector(&this->Subscriber,0,10,10);
- // try { // try from 0809ccd0 to 0809ccd4 has its CatchHandler @ 0809ccf3
- vector<>::vector(&this->InvitedPlayer,0,10,10);
- this->Moderator = 0;
- this->Subscribers = 0;
- this->InvitedPlayers = 0;
- return;
-}
-
-
-
-// DWARF original prototype: void TParty(TParty * this)
-
-void __thiscall TParty::TParty(TParty *this)
-
-{
- vector<>::vector(&this->Member,0,10,10);
- // try { // try from 0809cd60 to 0809cd64 has its CatchHandler @ 0809cd83
- vector<>::vector(&this->InvitedPlayer,0,10,10);
- this->Leader = 0;
- this->Members = 0;
- this->InvitedPlayers = 0;
- return;
-}
-
-// DWARF original prototype: TStatement * append(fifo<TStatement> * this)
-
-TStatement * __thiscall fifo<TStatement>::append(fifo<TStatement> *this)
-
-{
- TStatement *pTVar1;
- undefined3 uVar2;
- TStatement *pTVar3;
- int iVar4;
- int iVar5;
- int iVar6;
- int i;
- int iVar7;
- TStatement *NewEntry;
-
- iVar5 = this->Head;
- iVar6 = this->Size;
- iVar4 = iVar6;
- if ((iVar5 - this->Tail) + 1 == iVar6) {
- iVar4 = iVar6 * 2;
- pTVar3 = (TStatement *)operator_new__(iVar6 * 0x38);
- iVar5 = this->Head;
- iVar6 = this->Tail;
- if (iVar6 <= iVar5) {
- do {
- iVar5 = iVar6 % iVar4;
- iVar7 = iVar6 + 1;
- iVar6 = iVar6 % this->Size;
- pTVar1 = this->Entry;
- pTVar3[iVar5].StatementID = pTVar1[iVar6].StatementID;
- pTVar3[iVar5].TimeStamp = pTVar1[iVar6].TimeStamp;
- pTVar3[iVar5].CharacterID = pTVar1[iVar6].CharacterID;
- pTVar3[iVar5].Mode = pTVar1[iVar6].Mode;
- pTVar3[iVar5].Channel = pTVar1[iVar6].Channel;
- pTVar3[iVar5].Text = pTVar1[iVar6].Text;
- uVar2 = *(undefined3 *)&pTVar1[iVar6].field_0x19;
- pTVar3[iVar5].Reported = pTVar1[iVar6].Reported;
- *(undefined3 *)&pTVar3[iVar5].field_0x19 = uVar2;
- iVar5 = this->Head;
- iVar6 = iVar7;
- } while (iVar7 <= iVar5);
- }
- if (this->Entry != (TStatement *)0x0) {
- operator_delete__(this->Entry);
- iVar5 = this->Head;
- }
- this->Entry = pTVar3;
- this->Size = iVar4;
- }
- this->Head = iVar5 + 1;
- return this->Entry + (iVar5 + 1) % iVar4;
-}
-
-
-
-// DWARF original prototype: TListener * append(fifo<TListener> * this)
-
-TListener * __thiscall fifo<TListener>::append(fifo<TListener> *this)
-
-{
- ulong uVar1;
- TListener *pTVar2;
- int iVar3;
- int iVar4;
- int i;
- int iVar5;
- int iVar6;
- TListener *NewEntry;
-
- iVar3 = this->Head;
- iVar5 = this->Size;
- iVar4 = iVar5;
- if ((iVar3 - this->Tail) + 1 == iVar5) {
- iVar4 = iVar5 * 2;
- pTVar2 = (TListener *)operator_new__(iVar5 << 4);
- iVar5 = this->Tail;
- iVar3 = this->Head;
- if (iVar5 <= iVar3) {
- do {
- iVar6 = iVar5 + 1;
- uVar1 = this->Entry[iVar5 % this->Size].CharacterID;
- pTVar2[iVar5 % iVar4].StatementID = this->Entry[iVar5 % this->Size].StatementID;
- pTVar2[iVar5 % iVar4].CharacterID = uVar1;
- iVar3 = this->Head;
- iVar5 = iVar6;
- } while (iVar6 <= iVar3);
- }
- if (this->Entry != (TListener *)0x0) {
- operator_delete__(this->Entry);
- iVar3 = this->Head;
- }
- this->Entry = pTVar2;
- this->Size = iVar4;
- }
- this->Head = iVar3 + 1;
- return this->Entry + (iVar3 + 1) % iVar4;
-}
-
void __static_initialization_and_destruction_0(int __initialize_p,int __priority)
{
|
