Jump to content

[not working] Outdoor Pvp


Recommended Posts

we could change the HandlePLayerLeaveZone a bit

cause if we leave an outdoor-zone we have already the m_OPVP-pointer set inside playerclass and can directly call the outdoor-class for the leave..

but have to go now and can't write code.. maybe this evenign i'm back :S

Link to comment
Share on other sites

  • Replies 621
  • Created
  • Last Reply

Top Posters In This Topic

crashes were just related to removeplayer from outdoorpvp calls when logging out (alt+f4)beeing infight in instance because now map/player is removed earlier for crash prevention

+ if (_player->GetOutdoorPvP())

0

+ _player->GetOutdoorPvP()->HandlePlayerLeaveZone(_player, _player->GetZoneId());

this has to fix it :) - thx

Link to comment
Share on other sites

if getzoneid() causes crashes we also can replace it with "0" there.. it's just there to call ClearWorldStates funcion, which isn't needed at logout..

also we should look if this function (clearworldstates) is needed at all.. at least battlegrounds don't have this..

and afaik in mangos without outdoorpvp, the worldstates are already sent, but not cleared at zonechanges with such functions..

Link to comment
Share on other sites

i've got a little problem on the balrok mangos update with this, i've get all the method and objects, function on my core all which is in used bug outdoorpvp but the core init the outdoor area (it said that) but where i'm IG he does'nt pop any gameobject and i can't capture anythink... any idea ?

after many tests, i've got where does come the error :

if (GetOutdoorPvP())

GetOutdoorPvP()->HandlePlayerLeaveZone(this, m_zoneUpdateId);

SetOutdoorPvP(GetMap()->GetOutdoorPvP(newZone));

if (GetOutdoorPvP())

GetOutdoorPvP()->HandlePlayerEnterZone(this, newZone);

In the update zone, GetOutdoorPvP() return false as i've said, but it was initialized true.... i dont understand

Link to comment
Share on other sites

maybe its strange.

The problem is simple, the emu launch the zones but they aren't lanched, they've their old world states like if i haven't implemented the patch but they are there... i don't understand why. When i go to a pvp capturable zone the emu don't enter un the function handleplayerenterzone => getoutdoorpvp is null but why ? the emu have launched the zone...

Any idea?

Link to comment
Share on other sites

I thought you said the GetZoneId() call would be dangerous?

indeed

_player->GetOutdoorPvP()->HandlePlayerLeaveZone(_player, _player->GetZoneId());

this is what you got there: _player->GetZoneId()

this will later try to get players map and then crash because map was already deleted @ player instance leave(far tele)

but in current form it is save

Link to comment
Share on other sites

patch for master is broken :/

today i did some work for better setting map-pointer.. but there is a problem with spawning creatures and gameobjects..

maybe best thing is just using the bg-spawnsystem for those maps.. but this will need some more time

just wanted to inform you that you don't need to report bugs about this

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

if someone wants to port the bg_event-patch from battleground to mapclass it will speed up the progress very much.. but i currently don't have enough time for it.. i think next year it will get better

if someone is interested: here is my first work on this: http://github.com/balrok/mangos/commits/map_move2

it needs some compile-testing and some hacks must get removed sql stuff must get renamed (battleground_creature event_creature or map_creature.. i don't know.. it's always the hardest thing to get good sounding names, which will describe everything well enough^^)

if this is done the spawnsystem of outdoorstuff must get rewritten and then it will work again.. (also after this sd2-code can maybe be simplified, since no spawncoords must be inside the scripts and spawning inside scripts will get as easy as in battlegrounds then.. :) )

Link to comment
Share on other sites

  • 2 weeks later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use