Page 1 of 2

GM Command - Jailing Users in Mog House

Posted: Sun Dec 01, 2013 11:02 pm
by StyxRiver
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.

Re: GM Command - Jailing Users in Mog House

Posted: Sun Dec 01, 2013 11:43 pm
by kjLotus
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 ^^)

Re: GM Command - Jailing Users in Mog House

Posted: Mon Dec 02, 2013 1:22 pm
by StyxRiver
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.

Re: GM Command - Jailing Users in Mog House

Posted: Tue Dec 03, 2013 9:04 am
by Sirus7264
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.

Re: GM Command - Jailing Users in Mog House

Posted: Tue Dec 03, 2013 9:40 am
by StyxRiver
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.

Re: GM Command - Jailing Users in Mog House

Posted: Tue Dec 03, 2013 12:15 pm
by atom0s
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.

Re: GM Command - Jailing Users in Mog House

Posted: Tue Dec 03, 2013 2:59 pm
by kjLotus
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.

Re: GM Command - Jailing Users in Mog House

Posted: Tue Dec 03, 2013 3:41 pm
by StyxRiver
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.

Re: GM Command - Jailing Users in Mog House

Posted: Tue Dec 03, 2013 6:46 pm
by kjLotus
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

Re: GM Command - Jailing Users in Mog House

Posted: Tue Dec 03, 2013 7:35 pm
by whasf
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.