GM Command - Jailing Users in Mog House
GM Command - Jailing Users in Mog House
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.
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 382 times
Re: GM Command - Jailing Users in Mog House
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 ^^)
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
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
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
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
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
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
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
delete his character!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.
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
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.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.
-- Whasf