CRASH FIX FOR PVP ZONE AREA

Forum rules
NO LONGER BEING MAINTAINED!
Post Reply
WiiStream

CRASH FIX FOR PVP ZONE AREA

Post by WiiStream » Sat Mar 09, 2013 2:03 am

FIND

Code: Select all

void CEnmityContainer::UpdateEnmity(CBattleEntity* PEntity, int16 CE, int16 VE)
ADD BELOW

Code: Select all

if(PEntity->loc.zone->GetEntity(PEntity->m_TargID, TYPE_PC))
	{

		//ShowNotice(CL_RED"TRACER:  PLAYER %s GETS TARGET TYPE PC %u\n" CL_RESET,PEntity->GetName(),PEntity->loc.zone->GetEntity(PEntity->m_TargID, TYPE_PC));
		return;
	}

xoleras20099
Posts: 6
Joined: Tue Jul 31, 2012 10:12 am

Re: CRASH FIX FOR PVP ZONE AREA

Post by xoleras20099 » Sat Mar 09, 2013 4:08 pm

This works great, glad to see progress on this, but we need to also fix the problems the PvPFlag allows.

You can A.
Cast combative spells on yourself, this leads to being able to put yourself on a zombie state by "Killing" yourself with spells.
This can be fixed either via C++ or by changing the OnMagicCastingCheck to return a 1 if the caster is the target of each "Combat" spell in the LUA.

You can B. Pull your weapon out on yourself if you target yourself and press Control+A.

B should be relatively harmless, I mean, if someone really wants to beat themselves to death... Why not? Lmao.

A is a problem that needs to be fixed though.
[GM]Sabriel of the SinisterSkies Private Server.

Image

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: CRASH FIX FOR PVP ZONE AREA

Post by kjLotus » Sun Mar 10, 2013 2:49 am

the project's not really at a point where we have pvp on any priority yet

WiiStream

Re: CRASH FIX FOR PVP ZONE AREA

Post by WiiStream » Sun Mar 10, 2013 6:24 pm

LOL that's some funny stuff there, Ya I bet your could do that , I didn't go to far with it, I just wanted it to stop crashing the server, but the PVP system is really pretty small of a system it does not do much. sets a flag to the player and not allowing the player to cast on self and attack self.

Seems very simple to make this system!

PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Re: CRASH FIX FOR PVP ZONE AREA

Post by PrBlahBlahtson » Mon Mar 11, 2013 2:24 am

I think someone mentioned not being attackable if you kill your opponent. Kind of similar to a mob not going unclaimed.

xoleras20099
Posts: 6
Joined: Tue Jul 31, 2012 10:12 am

Re: CRASH FIX FOR PVP ZONE AREA

Post by xoleras20099 » Sat Mar 16, 2013 12:20 pm

This is true, Pr. But is (Temporarily) preventable by having everyone fighting in a party together or relogging to change opponents.
Not a solid fix, but a workaround.

We've been using this code (and going a step further by adding a command for players to toggle PvP on themselves anywhere).

The only crashes I've seen (although not retested on current revisions) are:

- If a player uses Charm, Steal or Mug on their opponent. (Easily preventable in the respective LUAs.)
- If a player hits more than one other Player with a hostile AoE. (Weaponskills, Firaga, Poisonga, etc.) (This may have been fixed in newer revisions, I have not tested this yet.)

We did have ourselves a fun night with a GM Event I ran.

I did a "Server Vs. Sabriel" event, ended up with about 9 players fighting me in Abyssea - Empyreal Paradox.
Had a good 10-15min fight straight with no crashes. (Ended with me just barely finishing them off.)

So besides the few things I posted above and the claim issues, those few lines you tossed in really do work wonders on allowing PvP.
[GM]Sabriel of the SinisterSkies Private Server.

Image

User avatar
Virtualchronos
Posts: 53
Joined: Wed Dec 12, 2012 8:45 am

Re: CRASH FIX FOR PVP ZONE AREA

Post by Virtualchronos » Sat Mar 16, 2013 5:05 pm

it seems pretty fun to try

which file should I modify to test it ?
Is it possible to change it in SVN ?

Post Reply