Page 1 of 1
CRASH FIX FOR PVP ZONE AREA
Posted: Sat Mar 09, 2013 2:03 am
by WiiStream
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;
}
Re: CRASH FIX FOR PVP ZONE AREA
Posted: Sat Mar 09, 2013 4:08 pm
by xoleras20099
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.
Re: CRASH FIX FOR PVP ZONE AREA
Posted: Sun Mar 10, 2013 2:49 am
by kjLotus
the project's not really at a point where we have pvp on any priority yet
Re: CRASH FIX FOR PVP ZONE AREA
Posted: Sun Mar 10, 2013 6:24 pm
by WiiStream
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!
Re: CRASH FIX FOR PVP ZONE AREA
Posted: Mon Mar 11, 2013 2:24 am
by PrBlahBlahtson
I think someone mentioned not being attackable if you kill your opponent. Kind of similar to a mob not going unclaimed.
Re: CRASH FIX FOR PVP ZONE AREA
Posted: Sat Mar 16, 2013 12:20 pm
by xoleras20099
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.
Re: CRASH FIX FOR PVP ZONE AREA
Posted: Sat Mar 16, 2013 5:05 pm
by Virtualchronos
it seems pretty fun to try
which file should I modify to test it ?
Is it possible to change it in SVN ?