From dbee845a5cfb6ca419604ac984d1845440f76007 Mon Sep 17 00:00:00 2001 From: fusion32 Date: Tue, 3 Jun 2025 16:00:35 -0300 Subject: more spells --- reference/game.c | 1139 ------------------------------------------------------ 1 file changed, 1139 deletions(-) (limited to 'reference') diff --git a/reference/game.c b/reference/game.c index 65ac6f5..b469c0e 100644 --- a/reference/game.c +++ b/reference/game.c @@ -20852,1145 +20852,6 @@ void __static_initialization_and_destruction_0(int __initialize_p,int __priority return; } -void SummonCreature(TCreature *cr,int Mana,int Race,bool God) - -{ - bool bVar1; - ulong Father; - int iVar2; - undefined4 *puVar3; - int Delay; - int iStack_28; - bool God_local; - int posx; - int posy; - int posz; - - if (cr == (TCreature *)0x0) { - error(&DAT_080fb980); - } - else { - if (Race - 1U < 0x1ff) { - if (God) { - bVar1 = CheckRight(cr->ID,CREATE_MONSTERS); - if (!bVar1) { - return; - } - } - else { - if (((cr->Type == PLAYER) && (bVar1 = CheckRight(cr->ID,CREATE_MONSTERS), !bVar1)) - && (bVar1 = GetRaceNoSummon(Race), bVar1)) { - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 1; - goto LAB_08083d9d; - } - if (((!God) && (cr->Type == PLAYER)) && (1 < cr->SummonedCreatures)) { - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 0x38; - goto LAB_08083d9d; - } - } - iStack_28 = cr->posx; - posx = cr->posy; - posy = cr->posz; - // try { // try from 08083cd8 to 08083e67 has its CatchHandler @ 08083e70 - bVar1 = SearchSummonField(&stack0xffffffd8,&posx,&posy,2); - if (bVar1) { - if (!God) { - iVar2 = GetRaceSummonCost(Race); - Delay = 1000; - if (WorldType != PVP_ENFORCED) { - Delay = 2000; - } - CheckMana(cr,iVar2 + Mana,0,Delay); - } - Father = 0; - if (!God) { - Father = cr->ID; - } - CreateMonster(Race,iStack_28,posx,posy,0,Father,true); - posz = (cr->CrObject).ObjectID; - GraphicalEffect((Object *)&posz,0xd); - return; - } - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 4; - goto LAB_08083d9d; - } - error(&DAT_080fb940,Race); - } - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 0xffffffff; -LAB_08083d9d: - // WARNING: Subroutine does not return - __cxa_throw(puVar3,&RESULT::typeinfo,0); -} - - - -// WARNING: Variable defined which should be unmapped: God_local - -void SummonCreature(TCreature *cr,int Mana,char *RaceName,bool God) - -{ - char *pcVar1; - int iVar2; - undefined4 *puVar3; - int i; - int Race_00; - int Race; - int Race_01; - bool God_local; - - if (cr == (TCreature *)0x0) { - pcVar1 = &DAT_080fb980; - } - else { - if (RaceName != (char *)0x0) { - Race_00 = 1; - do { - // try { // try from 08083ec6 to 08083f54 has its CatchHandler @ 08083f72 - pcVar1 = GetRaceName(Race_00); - iVar2 = stricmp(RaceName,pcVar1,-1); - Race_01 = Race_00; - if (iVar2 == 0) break; - Race_00 = Race_00 + 1; - Race_01 = 0; - } while (Race_00 < 0x200); - if (Race_01 != 0) { - SummonCreature(cr,Mana,Race_01,God); - return; - } - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 0x19; - goto LAB_08083f2d; - } - pcVar1 = &DAT_080fb9c0; - } - error(pcVar1); - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 0xffffffff; -LAB_08083f2d: - // WARNING: Subroutine does not return - __cxa_throw(puVar3,&RESULT::typeinfo,0); -} - - - -void StartMonsterraid(TCreature *cr,char *RaidName) - -{ - bool bVar1; - undefined4 *puVar2; - char *Text; - Object local_102c [4]; - char local_101c [4]; - char FileName [4096]; - - if (cr == (TCreature *)0x0) { - Text = &DAT_080fba40; - } - else { - if (RaidName != (char *)0x0) { - // try { // try from 08083fc9 to 0808403f has its CatchHandler @ 08084130 - bVar1 = CheckRight(cr->ID,CREATE_MONSTERS); - if (bVar1) { - strLower(RaidName); - snprintf(local_101c,0x1000,"%s/%s.evt",MONSTERPATH,RaidName); - bVar1 = FileExists(local_101c); - if (bVar1) { - // try { // try from 0808406e to 08084094 has its CatchHandler @ 080840d9 - LoadMonsterRaid(local_101c,RoundNr,(bool *)0x0,(int *)0x0,(int *)0x0,(int *)0x0) - ; - local_102c[0].ObjectID = (cr->CrObject).ObjectID; - GraphicalEffect(local_102c,0xd); - } - else { - local_102c[0].ObjectID = (cr->CrObject).ObjectID; - GraphicalEffect(local_102c,3); - } - } - return; - } - Text = &DAT_080fba00; - } - // try { // try from 080840a1 to 080840cf has its CatchHandler @ 08084130 - error(Text); - puVar2 = (undefined4 *)__cxa_allocate_exception(4); - *puVar2 = 0xffffffff; - // WARNING: Subroutine does not return - __cxa_throw(puVar2,&RESULT::typeinfo,0); -} - - - -// WARNING: Unknown calling convention -- yet parameter storage is locked - -void RaiseDead(void) - -{ - bool bVar1; - uint uVar2; - undefined4 *puVar3; - ulong uVar4; - int Delay; - TCreature *in_stack_00000004; - Object *in_stack_00000008; - int in_stack_0000000c; - int in_stack_00000010; - char *Text; - int *y_00; - int *z_00; - int local_48; - int x; - int y; - int z; - Object local_2c [7]; - - if (in_stack_00000004 == (TCreature *)0x0) { - Text = &DAT_080fbac0; - } - else { - // try { // try from 08084160 to 080843fa has its CatchHandler @ 08084420 - bVar1 = Object::exists(in_stack_00000008); - if (bVar1) { - local_2c[0].ObjectID = in_stack_00000008->ObjectID; - GetObjectCoordinates(local_2c,&local_48,&x,&y); - if (y == in_stack_00000004->posz) { - uVar2 = local_48 - in_stack_00000004->posx; - if (0x7fffffff < uVar2) { - uVar2 = -uVar2; - } - if ((int)uVar2 < 2) { - uVar2 = x - in_stack_00000004->posy; - if (0x7fffffff < uVar2) { - uVar2 = -uVar2; - } - if ((int)uVar2 < 2) { - GetFirstObject(); - in_stack_00000008->ObjectID = z; - local_2c[0].ObjectID = NONE.ObjectID; - if (z != NONE.ObjectID) { - do { - z = NONE.ObjectID; - local_2c[0].ObjectID = NONE.ObjectID; - Object::getObjectType((Object *)&z); - bVar1 = ObjectType::getFlag((ObjectType *)&z,CORPSE); - if (bVar1) { - Object::getObjectType((Object *)&z); - uVar4 = ObjectType::getAttribute((ObjectType *)&z,CORPSETYPE); - if (uVar4 == 1) break; - } - Object::getNextObject(local_2c); - in_stack_00000008->ObjectID = local_2c[0].ObjectID; - bVar1 = local_2c[0].ObjectID != NONE.ObjectID; - local_2c[0].ObjectID = NONE.ObjectID; - } while (bVar1); - } - z = NONE.ObjectID; - if (in_stack_00000008->ObjectID == NONE.ObjectID) { - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 0x1d; - } - else { - z_00 = &y; - y_00 = &x; - bVar1 = SearchFreeField(&local_48,y_00,z_00,1,0,false); - if ((bVar1) && - (y_00 = (int *)x, z_00 = (int *)y, bVar1 = IsProtectionZone(), !bVar1 - )) { - Delay = 1000; - if (WorldType != PVP_ENFORCED) { - Delay = 2000; - } - CheckMana(in_stack_00000004,in_stack_0000000c,in_stack_00000010, - Delay); - z = in_stack_00000008->ObjectID; - Delete((Object *)&z,-1); - CreateMonster(0x21,local_48,x,y,0,in_stack_00000004->ID,true); - return; - } - puVar3 = (undefined4 *)__cxa_allocate_exception(4,y_00,z_00); - *puVar3 = 4; - } - goto LAB_08084322; - } - } - } - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 5; - goto LAB_08084322; - } - Text = &DAT_080fba80; - } - error(Text); - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 0xffffffff; -LAB_08084322: - // WARNING: Subroutine does not return - __cxa_throw(puVar3,&RESULT::typeinfo,0); -} - - - -// WARNING: Unknown calling convention -- yet parameter storage is locked - -void MassRaiseDead(void) - -{ - bool bVar1; - ulong uVar2; - undefined4 *puVar3; - int zx; - int iVar4; - TCreature *in_stack_00000004; - Object *in_stack_00000008; - int in_stack_0000000c; - int in_stack_00000010; - int in_stack_00000014; - char *Text; - int dx; - int *local_88; - int dy; - int j; - int i; - int sx; - int sy; - int sz; - int x; - int y; - int z; - ulong local_4c; - Object Help; - Object local_3c; - Object Obj; - Object local_2c [7]; - - if (in_stack_00000004 == (TCreature *)0x0) { - Text = &DAT_080fbb40; - } - else { - // try { // try from 08084463 to 08084842 has its CatchHandler @ 08084860 - bVar1 = Object::exists(in_stack_00000008); - if (bVar1) { - local_2c[0].ObjectID = in_stack_00000008->ObjectID; - GetObjectCoordinates(local_2c,&sz,&x,&y); - bVar1 = ThrowPossible(in_stack_00000004->posx,in_stack_00000004->posy, - in_stack_00000004->posz,sz,x,y,0); - if (bVar1) { - iVar4 = 1000; - if (WorldType != PVP_ENFORCED) { - iVar4 = 2000; - } - CheckMana(in_stack_00000004,in_stack_0000000c,in_stack_00000010,iVar4); - if (((in_stack_00000004->posx != sz) || (in_stack_00000004->posy != x)) || - (in_stack_00000004->posz != y)) { - local_2c[0].ObjectID = (in_stack_00000004->CrObject).ObjectID; - GetMapContainer((int)&local_3c,sz,x); - Missile(local_2c,&local_3c,5); - } - j = 0; - if (-1 < in_stack_00000014) { - local_88 = &Circle[0].Count; - dx = 0; - do { - dy = 0; - iVar4 = dx; - if (0 < *local_88) { - do { - zx = Circle[0].x[iVar4 + dy] + sz; - iVar4 = Circle[0].y[iVar4 + dy] + x; - bVar1 = ThrowPossible(sz,x,y,zx,iVar4,y,0); - if (bVar1) { - GraphicalEffect(); - GetFirstObject(); - local_4c = NONE.ObjectID; - local_2c[0].ObjectID = local_4c; - if (local_3c.ObjectID != NONE.ObjectID) { - do { - local_4c = local_3c.ObjectID; - local_2c[0].ObjectID = NONE.ObjectID; - Object::getNextObject((Object *)&z); - local_3c.ObjectID = z; - local_2c[0].ObjectID = z; - Object::getObjectType((Object *)&z); - bVar1 = ObjectType::getFlag((ObjectType *)&z,CORPSE); - if (bVar1) { - Object::getObjectType((Object *)&z); - uVar2 = ObjectType::getAttribute - ((ObjectType *)&z,CORPSETYPE); - if (uVar2 == 1) { - sy = y; - i = zx; - sx = iVar4; - bVar1 = SearchFreeField(&i,&sx,&sy,1,0,false); - if ((bVar1) && - (bVar1 = IsProtectionZone(), !bVar1)) { - z = local_4c; - Delete((Object *)&z,-1); - CreateMonster(0x21,i,sx,sy,0, - in_stack_00000004->ID,false); - } - } - } - local_2c[0].ObjectID = NONE.ObjectID; - local_4c = NONE.ObjectID; - } while (local_3c.ObjectID != NONE.ObjectID); - } - } - dy = dy + 1; - iVar4 = j * 0x41; - } while (dy < *local_88); - } - j = j + 1; - local_88 = local_88 + 0x41; - dx = dx + 0x41; - } while (j <= in_stack_00000014); - } - return; - } - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 7; - goto LAB_0808481f; - } - Text = &DAT_080fbb00; - } - error(Text); - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 0xffffffff; -LAB_0808481f: - // WARNING: Subroutine does not return - __cxa_throw(puVar3,&RESULT::typeinfo,0); -} - - - -// WARNING: Unknown calling convention -- yet parameter storage is locked - -void Heal(void) - -{ - TSkill *this; - int iVar1; - undefined4 *puVar2; - TSkill *sk; - TCreature *in_stack_00000004; - int in_stack_00000008; - int in_stack_0000000c; - int in_stack_00000010; - char *Text; - Object local_1c [4]; - - if (in_stack_00000004 == (TCreature *)0x0) { - Text = &DAT_080fbbc0; - } - else { - if (WorldType == NON_PVP) { - iVar1 = (*in_stack_00000004->_vptr_TCreature[4])(); - if ((char)iVar1 == '\0') { - puVar2 = (undefined4 *)__cxa_allocate_exception(4); - *puVar2 = 1; - goto LAB_0808496b; - } - } - // try { // try from 080848bd to 0808498a has its CatchHandler @ 080849b0 - CheckMana(in_stack_00000004,in_stack_00000008,in_stack_0000000c,1000); - this = (in_stack_00000004->super_TSkillBase).Skills[2]; - if (this != (TSkill *)0x0) { - iVar1 = TSkill::Get(this); - if (0 < iVar1) { - TSkill::Change(this,in_stack_00000010); - if ((in_stack_00000004->super_TSkillBase).Skills[4]->MDAct < 0) { - TSkillBase::SetTimer(&in_stack_00000004->super_TSkillBase); - } - local_1c[0].ObjectID = (in_stack_00000004->CrObject).ObjectID; - GraphicalEffect(local_1c,0xd); - } - return; - } - Text = "Heal: Skill HITPOINTS existiert nicht.\n"; - } - error(Text); - puVar2 = (undefined4 *)__cxa_allocate_exception(4); - *puVar2 = 0xffffffff; -LAB_0808496b: - // WARNING: Subroutine does not return - __cxa_throw(puVar2,&RESULT::typeinfo,0); -} - - - -// WARNING: Unknown calling convention -- yet parameter storage is locked - -void MassHeal(void) - -{ - TSkill *this; - bool bVar1; - TCreature *pTVar2; - int iVar3; - undefined4 *puVar4; - TCreature *in_stack_00000004; - Object *in_stack_00000008; - int in_stack_0000000c; - int in_stack_00000010; - int in_stack_00000014; - int in_stack_00000018; - char *Text; - ulong *puVar5; - int local_78; - int *local_74; - int local_70; - int j; - int i; - int x; - int y; - int z; - ulong local_4c; - Object Help; - Object local_3c; - Object Obj; - Object local_2c [7]; - - if (in_stack_00000004 == (TCreature *)0x0) { - Text = &DAT_080fbc80; - } - else { - // try { // try from 080849f3 to 08084d1a has its CatchHandler @ 08084d73 - bVar1 = Object::exists(in_stack_00000008); - if (bVar1) { - local_2c[0].ObjectID = in_stack_00000008->ObjectID; - GetObjectCoordinates(local_2c,&i,&x,&y); - bVar1 = ThrowPossible(in_stack_00000004->posx,in_stack_00000004->posy, - in_stack_00000004->posz,i,x,y,0); - if (bVar1) { - CheckMana(in_stack_00000004,in_stack_0000000c,in_stack_00000010,1000); - if (((in_stack_00000004->posx != i) || (in_stack_00000004->posy != x)) || - (in_stack_00000004->posz != y)) { - local_2c[0].ObjectID = (in_stack_00000004->CrObject).ObjectID; - GetMapContainer((int)&local_3c,i,x); - Missile(local_2c,&local_3c,5); - } - j = 0; - if (-1 < in_stack_00000018) { - local_74 = &Circle[0].Count; - local_78 = 0; - do { - local_70 = 0; - iVar3 = local_78; - if (0 < *local_74) { - do { - bVar1 = ThrowPossible(i,x,y,i + Circle[0].x[iVar3 + local_70], - x + Circle[0].y[iVar3 + local_70],y,0); - if (bVar1) { - GraphicalEffect(); - GetFirstObject(); - local_4c = NONE.ObjectID; - local_2c[0].ObjectID = local_4c; - if (local_3c.ObjectID != NONE.ObjectID) { - do { - puVar5 = &local_4c; - local_4c = local_3c.ObjectID; - local_2c[0].ObjectID = NONE.ObjectID; - Object::getNextObject((Object *)&z); - local_3c.ObjectID = z; - local_2c[0].ObjectID = z; - Object::getObjectType((Object *)&z); - if (z == 99) { - z = local_4c; - pTVar2 = GetCreature((Object *)&z); - if (pTVar2 == (TCreature *)0x0) { - error(&DAT_080fe061,puVar5); - } - else if ((WorldType != NON_PVP) || - (iVar3 = (*pTVar2->_vptr_TCreature[4]) - (pTVar2), - (char)iVar3 != '\0')) { - this = (pTVar2->super_TSkillBase).Skills[2]; - if (this == (TSkill *)0x0) { - Text = - "MassHeal: Skill HITPOINTS existiert nicht.\n"; - goto LAB_08084ccb; - } - iVar3 = TSkill::Get(this); - if ((0 < iVar3) && - (TSkill::Change(this,in_stack_00000014), - (pTVar2->super_TSkillBase).Skills[4]->MDAct < 0 - )) { - TSkillBase::SetTimer - (&pTVar2->super_TSkillBase); - } - } - } - local_2c[0].ObjectID = NONE.ObjectID; - local_4c = NONE.ObjectID; - } while (local_3c.ObjectID != NONE.ObjectID); - } - } - local_70 = local_70 + 1; - iVar3 = j * 0x41; - } while (local_70 < *local_74); - } - j = j + 1; - local_74 = local_74 + 0x41; - local_78 = local_78 + 0x41; - } while (j <= in_stack_00000018); - } - return; - } - puVar4 = (undefined4 *)__cxa_allocate_exception(4); - *puVar4 = 7; - goto LAB_08084ce2; - } - Text = &DAT_080fbc40; - } -LAB_08084ccb: - error(Text); - puVar4 = (undefined4 *)__cxa_allocate_exception(4); - *puVar4 = 0xffffffff; -LAB_08084ce2: - // WARNING: Subroutine does not return - __cxa_throw(puVar4,&RESULT::typeinfo,0); -} - - - -// WARNING: Unknown calling convention -- yet parameter storage is locked - -void HealFriend(void) - -{ - TSkill *this; - int iVar1; - uint uVar2; - undefined4 *puVar3; - TSkill *sk; - TCreature *in_stack_00000004; - char *in_stack_00000008; - int in_stack_0000000c; - int in_stack_00000010; - int in_stack_00000014; - char *Text; - TPlayer *local_20; - TPlayer *pl; - - if (in_stack_00000004 == (TCreature *)0x0) { - Text = &DAT_080fbd40; - } - else { - if (in_stack_00000008 != (char *)0x0) { - // try { // try from 08084dc8 to 08084f34 has its CatchHandler @ 08084f83 - iVar1 = IdentifyPlayer(in_stack_00000008,false,true,&local_20); - if (iVar1 == -1) { -LAB_08084eff: - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 0x1b; - } - else { - if (iVar1 == -2) { - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 0x1c; - goto LAB_08084f11; - } - if (in_stack_00000004->posz == (local_20->super_TCreature).posz) { - uVar2 = in_stack_00000004->posx - (local_20->super_TCreature).posx; - if (0x7fffffff < uVar2) { - uVar2 = -uVar2; - } - if ((int)uVar2 < 8) { - uVar2 = in_stack_00000004->posy - (local_20->super_TCreature).posy; - if (0x7fffffff < uVar2) { - uVar2 = -uVar2; - } - if ((int)uVar2 < 6) { - this = (local_20->super_TCreature).super_TSkillBase.Skills[2]; - if (this == (TSkill *)0x0) { - Text = "HealFriend: Skill HITPOINTS existiert nicht.\n"; - goto LAB_08084f30; - } - iVar1 = TSkill::Get(this); - if (0 < iVar1) { - CheckMana(in_stack_00000004,in_stack_0000000c,in_stack_00000010,1000 - ); - TSkill::Change(this,in_stack_00000014); - if ((local_20->super_TCreature).super_TSkillBase.Skills[4]->MDAct < - 0) { - TSkillBase::SetTimer - (&(local_20->super_TCreature).super_TSkillBase); - } - pl = (TPlayer *)(in_stack_00000004->CrObject).ObjectID; - GraphicalEffect((Object *)&pl,0xd); - pl = (TPlayer *)(local_20->super_TCreature).CrObject.ObjectID; - GraphicalEffect((Object *)&pl,0xf); - return; - } - goto LAB_08084eff; - } - } - } - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 5; - } - goto LAB_08084f11; - } - Text = &DAT_080fbd00; - } -LAB_08084f30: - error(Text); - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 0xffffffff; -LAB_08084f11: - // WARNING: Subroutine does not return - __cxa_throw(puVar3,&RESULT::typeinfo,0); -} - - - -// WARNING: Unknown calling convention -- yet parameter storage is locked - -void RefreshMana(void) - -{ - TSkill *this; - undefined4 *puVar1; - TSkill *sk; - TCreature *in_stack_00000004; - int in_stack_00000008; - int in_stack_0000000c; - int in_stack_00000010; - char *Text; - Object local_1c [5]; - - if (in_stack_00000004 == (TCreature *)0x0) { - Text = &DAT_080fbdc0; - } - else { - // try { // try from 08084fcd to 08085040 has its CatchHandler @ 08085050 - CheckMana(in_stack_00000004,in_stack_00000008,in_stack_0000000c,1000); - this = (in_stack_00000004->super_TSkillBase).Skills[3]; - if (this != (TSkill *)0x0) { - TSkill::Change(this,in_stack_00000010); - local_1c[0].ObjectID = (in_stack_00000004->CrObject).ObjectID; - GraphicalEffect(local_1c,0xd); - return; - } - Text = "RefreshMana: Skill MANA existiert nicht.\n"; - } - error(Text); - puVar1 = (undefined4 *)__cxa_allocate_exception(4); - *puVar1 = 0xffffffff; - // WARNING: Subroutine does not return - __cxa_throw(puVar1,&RESULT::typeinfo,0); -} - - - -// WARNING: Unknown calling convention -- yet parameter storage is locked - -void MagicGoStrength(void) - -{ - TSkill *this; - bool bVar1; - char cVar2; - undefined4 *puVar3; - TSkill *sk; - int mdact; - int iVar4; - TCreature *in_stack_00000004; - int *in_stack_00000008; - int in_stack_0000000c; - int in_stack_00000010; - int in_stack_00000014; - char *Text; - Object local_2c [7]; - - if (in_stack_00000008 == (int *)0x0) { - Text = &DAT_080fbe40; - } - else { - if (in_stack_00000004 != (TCreature *)0x0) { - if (-1 < in_stack_00000014) { -LAB_080850a0: - // try { // try from 080850b9 to 0808522b has its CatchHandler @ 08085250 - CheckMana(in_stack_00000004,in_stack_0000000c,in_stack_00000010,1000); - this = (TSkill *)in_stack_00000008[5]; - if (in_stack_00000014 < -100) { - iVar4 = -0x14 - this->Act; - } - else { - iVar4 = (this->Act * in_stack_00000014) / 100; - } - TSkill::SetMDAct(this,iVar4); - TSkillBase::SetTimer((TSkillBase *)(in_stack_00000008 + 1)); - if (in_stack_00000014 < 0) { - TCreature::BlockLogout(in_stack_00000004,0x3c,in_stack_00000008[0xa3] == 0); - } - local_2c[0].ObjectID = (in_stack_00000004->CrObject).ObjectID; - GraphicalEffect(local_2c,0xf); - local_2c[0].ObjectID = in_stack_00000008[0xb4]; - GraphicalEffect(local_2c,0xe); - return; - } - bVar1 = GetRaceNoParalyze(in_stack_00000008[0xa0]); - if (!bVar1) { - if (WorldType == NON_PVP) { - iVar4 = (*in_stack_00000004->_vptr_TCreature[4])(); - if ((char)iVar4 != '\0') { - cVar2 = (**(code **)(*in_stack_00000008 + 0x10))(); - if (cVar2 != '\0') { - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 0x2b; - goto LAB_080851f1; - } - } - } - goto LAB_080850a0; - } - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 1; - goto LAB_080851f1; - } - Text = &DAT_080fbe00; - } - error(Text); - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 0xffffffff; -LAB_080851f1: - // WARNING: Subroutine does not return - __cxa_throw(puVar3,&RESULT::typeinfo,0); -} - - - -// WARNING: Unknown calling convention -- yet parameter storage is locked - -void Shielding(void) - -{ - undefined4 *puVar1; - TCreature *in_stack_00000004; - int in_stack_00000008; - int in_stack_0000000c; - Object local_1c [4]; - - if (in_stack_00000004 != (TCreature *)0x0) { - // try { // try from 0808529f to 0808532a has its CatchHandler @ 08085330 - CheckMana(in_stack_00000004,in_stack_00000008,in_stack_0000000c,1000); - TSkillBase::SetTimer(&in_stack_00000004->super_TSkillBase); - local_1c[0].ObjectID = (in_stack_00000004->CrObject).ObjectID; - GraphicalEffect(local_1c,0xd); - return; - } - error(&DAT_080fbe80); - puVar1 = (undefined4 *)__cxa_allocate_exception(4); - *puVar1 = 0xffffffff; - // WARNING: Subroutine does not return - __cxa_throw(puVar1,&RESULT::typeinfo,0); -} - - - -// WARNING: Unknown calling convention -- yet parameter storage is locked - -void NegatePoison(void) - -{ - undefined4 *puVar1; - TCreature *in_stack_00000004; - int in_stack_00000008; - int in_stack_0000000c; - int in_stack_00000010; - char *Text; - Object local_1c [5]; - - if (in_stack_00000004 == (TCreature *)0x0) { - Text = &DAT_080fbf00; - } - else { - if (in_stack_00000010 != 0) { - // try { // try from 08085384 to 08085414 has its CatchHandler @ 08085420 - CheckMana(in_stack_00000004,in_stack_00000008,in_stack_0000000c,1000); - TSkillBase::SetTimer((TSkillBase *)(in_stack_00000010 + 4)); - local_1c[0].ObjectID = *(ulong *)(in_stack_00000010 + 0x2d0); - GraphicalEffect(local_1c,0xd); - return; - } - Text = "NegatePoison: Zielkreatur existiert nicht.\n"; - } - error(Text); - puVar1 = (undefined4 *)__cxa_allocate_exception(4); - *puVar1 = 0xffffffff; - // WARNING: Subroutine does not return - __cxa_throw(puVar1,&RESULT::typeinfo,0); -} - - - -// WARNING: Unknown calling convention -- yet parameter storage is locked - -void Enlight(void) - -{ - TSkill *pTVar1; - int iVar2; - undefined4 *puVar3; - TCreature *in_stack_00000004; - int in_stack_00000008; - int in_stack_0000000c; - int in_stack_00000010; - Object local_1c [4]; - - if (in_stack_00000004 != (TCreature *)0x0) { - // try { // try from 08085473 to 08085511 has its CatchHandler @ 08085512 - CheckMana(in_stack_00000004,in_stack_00000008,in_stack_0000000c,1000); - pTVar1 = (in_stack_00000004->super_TSkillBase).Skills[0xf]; - iVar2 = (*pTVar1->_vptr_TSkill[0xd])(pTVar1); - if (iVar2 <= in_stack_00000010) { - TSkillBase::SetTimer(&in_stack_00000004->super_TSkillBase); - } - local_1c[0].ObjectID = (in_stack_00000004->CrObject).ObjectID; - GraphicalEffect(local_1c,0xd); - return; - } - error(&DAT_080fbf40); - puVar3 = (undefined4 *)__cxa_allocate_exception(4); - *puVar3 = 0xffffffff; - // WARNING: Subroutine does not return - __cxa_throw(puVar3,&RESULT::typeinfo,0); -} - - - -// WARNING: Unknown calling convention -- yet parameter storage is locked - -void Invisibility(void) - -{ - undefined4 *puVar1; - TCreature *in_stack_00000004; - int in_stack_00000008; - int in_stack_0000000c; - Object local_1c [4]; - - if (in_stack_00000004 != (TCreature *)0x0) { - // try { // try from 08085563 to 080855ff has its CatchHandler @ 08085600 - CheckMana(in_stack_00000004,in_stack_00000008,in_stack_0000000c,1000); - (in_stack_00000004->Outfit).field_1.ObjectType = 0; - (in_stack_00000004->Outfit).OutfitID = 0; - TSkillBase::SetTimer(&in_stack_00000004->super_TSkillBase); - local_1c[0].ObjectID = (in_stack_00000004->CrObject).ObjectID; - GraphicalEffect(local_1c,0xd); - return; - } - error(&DAT_080fbf80); - puVar1 = (undefined4 *)__cxa_allocate_exception(4); - *puVar1 = 0xffffffff; - // WARNING: Subroutine does not return - __cxa_throw(puVar1,&RESULT::typeinfo,0); -} - - - -// WARNING: Unknown calling convention -- yet parameter storage is locked - -void CancelInvisibility(void) - -{ - anon_union_4_2_730cd3ca_for_TOutfit_2 aVar1; - bool bVar2; - bool bVar3; - bool bVar4; - TCreature *pTVar5; - int iVar6; - long lVar7; - ulong uVar8; - undefined4 *puVar9; - TCreature *in_stack_00000004; - Object *in_stack_00000008; - int in_stack_0000000c; - int in_stack_00000010; - int in_stack_00000014; - char *Text; - int dx; - int local_a0; - int *local_9c; - ulong local_94; - int b; - TCreature *dest; - bool EffectShown; - int dy; - int j; - int i; - int x; - int y; - int z; - Object local_5c; - Object Item; - _func_int_varargs **local_4c; - Object Help; - Object local_3c; - Object Obj; - Object local_2c [7]; - - if (in_stack_00000004 == (TCreature *)0x0) { - Text = &DAT_080fc040; - } - else { - // try { // try from 08085643 to 08085bec has its CatchHandler @ 08085c10 - bVar3 = Object::exists(in_stack_00000008); - if (bVar3) { - local_2c[0].ObjectID = in_stack_00000008->ObjectID; - GetObjectCoordinates(local_2c,&i,&x,&y); - bVar3 = ThrowPossible(in_stack_00000004->posx,in_stack_00000004->posy, - in_stack_00000004->posz,i,x,y,0); - if (bVar3) { - CheckMana(in_stack_00000004,in_stack_0000000c,in_stack_00000010,1000); - if (((in_stack_00000004->posx != i) || (in_stack_00000004->posy != x)) || - (in_stack_00000004->posz != y)) { - local_2c[0].ObjectID = (in_stack_00000004->CrObject).ObjectID; - GetMapContainer((int)&local_3c,i,x); - Missile(local_2c,&local_3c,5); - } - j = 1; - if (0 < in_stack_00000014) { - local_9c = &Circle[1].Count; - local_a0 = 0x41; - do { - dy = 0; - iVar6 = local_a0; - if (0 < *local_9c) { - do { - bVar3 = ThrowPossible(i,x,y,Circle[0].x[iVar6 + dy] + i, - Circle[0].y[iVar6 + dy] + x,y,0); - if ((bVar3) && (bVar3 = IsProtectionZone(), !bVar3)) { - bVar3 = false; - GetFirstObject(); - if (local_3c.ObjectID != NONE.ObjectID) { - do { - dest = (TCreature *)&local_4c; - local_4c = (_func_int_varargs **)local_3c.ObjectID; - local_2c[0].ObjectID = NONE.ObjectID; - Object::getNextObject(&local_5c); - local_3c.ObjectID = local_5c.ObjectID; - local_2c[0].ObjectID = local_5c.ObjectID; - Object::getObjectType(&local_5c); - if ((_func_int_varargs **)local_5c.ObjectID == - (_func_int_varargs **)0x63) { - local_5c.ObjectID = (ulong)local_4c; - pTVar5 = GetCreature(&local_5c); - if (pTVar5 == (TCreature *)0x0) { - error(&DAT_080fbfc0,dest); - } - else { - bVar2 = false; - if (((pTVar5->Outfit).OutfitID == 0) && - ((pTVar5->Outfit).field_1.ObjectType == 0)) { - bVar2 = true; - } - if ((bVar2) && - ((WorldType != NON_PVP || - (iVar6 = (*pTVar5->_vptr_TCreature[4]) - (pTVar5), - (char)iVar6 == '\0')))) { - TSkillBase::SetTimer - (&pTVar5->super_TSkillBase); - iVar6 = TSkill::Get((pTVar5-> - super_TSkillBase).Skills[0x10]); - if (iVar6 == 0) { - aVar1 = (pTVar5->OrgOutfit).field_1; - (pTVar5->Outfit).OutfitID = - (pTVar5->OrgOutfit).OutfitID; - (pTVar5->Outfit).field_1 = aVar1; - AnnounceChangedCreature(pTVar5->ID,3); - local_5c.ObjectID = NONE.ObjectID; - local_2c[0].ObjectID = - (pTVar5->CrObject).ObjectID; - NotifyAllCreatures(local_2c,2,&local_5c); - } - else { - GraphicalEffect(); - bVar3 = true; - if (WorldType == PVP_ENFORCED) { - local_94 = 1; - do { - GetBodyObject((ulong)&local_5c, - pTVar5->ID); - bVar2 = false; - local_2c[0].ObjectID = NONE.ObjectID; - z = NONE.ObjectID; - if (local_5c.ObjectID != NONE.ObjectID - ) { - Object::getObjectType - ((Object *)&z); - bVar4 = ObjectType::getFlag(( - ObjectType *)&z,SKILLBOOST); - if (bVar4) { - Object::getObjectType((Object *)&z); - uVar8 = ObjectType::getAttribute - ((ObjectType *)&z, - BODYPOSITION); - if (uVar8 == local_94) { - Object::getObjectType((Object *)&z); - uVar8 = ObjectType::getAttribute - ((ObjectType *)&z, - SKILLNUMBER); - if (uVar8 == 0x10) { - bVar2 = true; - } - } - } - } - if (bVar2) { - lVar7 = random(); - if (lVar7 == 1) { - z = local_5c.ObjectID; - Delete((Object *)&z,-1); - } - break; - } - local_94 = local_94 + 1; - } while ((int)local_94 < 0xb); - } - } - } - } - } - } while (local_3c.ObjectID != NONE.ObjectID); - } - local_4c = (_func_int_varargs **)NONE.ObjectID; - local_2c[0].ObjectID = NONE.ObjectID; - if (!bVar3) { - GraphicalEffect(); - } - } - dy = dy + 1; - iVar6 = j * 0x41; - } while (dy < *local_9c); - } - j = j + 1; - local_9c = local_9c + 0x41; - local_a0 = local_a0 + 0x41; - } while (j <= in_stack_00000014); - } - return; - } - puVar9 = (undefined4 *)__cxa_allocate_exception(4); - *puVar9 = 7; - goto LAB_08085bc9; - } - Text = &DAT_080fc000; - } - error(Text); - puVar9 = (undefined4 *)__cxa_allocate_exception(4); - *puVar9 = 0xffffffff; -LAB_08085bc9: - // WARNING: Subroutine does not return - __cxa_throw(puVar9,&RESULT::typeinfo,0); -} - - - // WARNING: Unknown calling convention -- yet parameter storage is locked void CreatureIllusion(void) -- cgit v1.2.3