GM Command - Jailing Users in Mog House

StyxRiver
Posts: 9
Joined: Sun Aug 25, 2013 12:48 am

GM Command - Jailing Users in Mog House

Post by StyxRiver » Sun Dec 01, 2013 11:02 pm

Straightforward patch. Currently, players in a Mog House are immune to the jail command, because they are not listed in any zone.

DecreaseZoneCounter is called when a players zone from an area into the Residential Area, but IncreaseZoneCounter is not called, as part of the packet_system.cpp file. When a GM attempts to jail the player in a Residential Area, the jail command attempts to GetCharByName, which checks each zone's player list for that character. Without calling IncreaseZoneCounter, the player is 'off the grid,' since the Residential Area (zones 0 and 214) never have their lists updated.

This patch moves the filtering logic from packet_system.cpp to the IncreaseZoneCounter method of zone.cpp. The zone counters are updated, and if the user enters a residential area, all subsequent processing is stopped, which essentially emulates the current functionality, but allows the Residential Areas to have knowledge of all players within the Mog Houses.

YAY.
Attachments
ResidentialJailing.patch
(1.38 KiB) Downloaded 206 times

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

Re: GM Command - Jailing Users in Mog House

Post by kjLotus » Sun Dec 01, 2013 11:43 pm

i'll have to do a bit of testing, I tried once to make residential zones be on the same zoneTimer as the connecting zone, but it lead to weird bugs with targid's and people switching characters.

I think this is okay, but it might lead to being able to see other people in your mog house (I've no time to test right now with finals coming up ^^)

StyxRiver
Posts: 9
Joined: Sun Aug 25, 2013 12:48 am

Re: GM Command - Jailing Users in Mog House

Post by StyxRiver » Mon Dec 02, 2013 1:22 pm

Great, no rush. I tried to minimize as much change to the IncreaseZoneCounter as possible because of any sort of side effect. The only thing that really needed updated to allow jailing from Residential Areas is the m_charList array having knowledge of the players within the Residential Area.

Sirus7264
Posts: 19
Joined: Tue Oct 29, 2013 3:56 am

Re: GM Command - Jailing Users in Mog House

Post by Sirus7264 » Tue Dec 03, 2013 9:04 am

On the subject of Moghouses I have seen a number of issues ranging from being able to deliver items from your moghouse to when you change jobs it removes any previous equipment you had on the job that you may still have in your inventory. (Aka does not redress you in your previous wear for that job) Also when you zone into your moghouse while in a party it will sometimes show you in "Unknown" area. I havn't had to much time to look into it can someone point me in the direction of where information about the zone in the moghouse is at i would like to see if i can adjust and tweek around to fix some of the issues.

StyxRiver
Posts: 9
Joined: Sun Aug 25, 2013 12:48 am

Re: GM Command - Jailing Users in Mog House

Post by StyxRiver » Tue Dec 03, 2013 9:40 am

If I were to guess, I believe the 'unknown' area is related to the jailing aspect, in that when you zone into your mog house, you're no longer registered to any actual zone. I did not test this patch with multiple people signed into my test server, so I was not able to verify, but it seems reasonable that it would be the case.

User avatar
atom0s
Developer
Posts: 537
Joined: Thu Oct 25, 2012 9:52 am

Re: GM Command - Jailing Users in Mog House

Post by atom0s » Tue Dec 03, 2013 12:15 pm

kj and I discussed the Mog House issues recently. Ultimately it came down to the fact that the Mog House has no zone timer. Also the handling to zone into your mog house / zone out of your mog house is not exactly coded properly so that needs some work as well.

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

Re: GM Command - Jailing Users in Mog House

Post by kjLotus » Tue Dec 03, 2013 2:59 pm

atom0s wrote:kj and I discussed the Mog House issues recently. Ultimately it came down to the fact that the Mog House has no zone timer.

Yep. I might take another shot at it soon, think I know a better way than what I tried last time. If it works, then being in a mog house would place you in the previous zones zone timer, so iterating over eg. lower jeuno would catch all players in their mog house (who entered from lower jeuno). That would fix jailing, gear not displaying, /check, all that jazz.

StyxRiver
Posts: 9
Joined: Sun Aug 25, 2013 12:48 am

Re: GM Command - Jailing Users in Mog House

Post by StyxRiver » Tue Dec 03, 2013 3:41 pm

Sounds good to me, just trying to help. We recently had an issue where we had to jail someone who retreated to their MH. We had to wait for him to log out and then moved him manually in the database, so we got the job done, but was a touch frustrating. Hopefully it works out.

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

Re: GM Command - Jailing Users in Mog House

Post by kjLotus » Tue Dec 03, 2013 6:46 pm

StyxRiver wrote:Sounds good to me, just trying to help. We recently had an issue where we had to jail someone who retreated to their MH. We had to wait for him to log out and then moved him manually in the database, so we got the job done, but was a touch frustrating. Hopefully it works out.
delete his character!

make him PAY!

edit: there's also another way to iterate over all characters, which is done in the code for /tell (packet_system.cpp:3385). why getCharByName doesn't do that i don't know

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: GM Command - Jailing Users in Mog House

Post by whasf » Tue Dec 03, 2013 7:35 pm

kjLotus wrote:
atom0s wrote:kj and I discussed the Mog House issues recently. Ultimately it came down to the fact that the Mog House has no zone timer.

Yep. I might take another shot at it soon, think I know a better way than what I tried last time. If it works, then being in a mog house would place you in the previous zones zone timer, so iterating over eg. lower jeuno would catch all players in their mog house (who entered from lower jeuno). That would fix jailing, gear not displaying, /check, all that jazz.
That sounds kind of messy, why not make the mog house its own zone timer? Having to look at their previous zone seems unnecessary extra work.
-- Whasf

Post Reply