Closed QuiCM closed 11 years ago
Some things: 1)What happened to the configs in the third commit, i see them deleted but never newed up. 2)Your check for banned items will be setting buffs every 20ms or something like that. You should probably have two different datetime objects for last banned/last warned.
Some things, since its been a while since I last developed for this plugins, that im considering changing now are: Creating a "region object" for each flag, that will know how to deal with its conditions, so if the region is a time based hurt zone, then it would know how to get the players currently inside its region and hurt them. This would be sort of a mini plugin system inside of the plugin, so that other developers can simply extend this plugin with a new one or something along those lines. Another thing is serializing regions to json and dumping that in the db instead of havign all sorts of fields in the db, this way we could just have each region treated as all of the above, but only do something if its flag is enabled. This would also allow us to ditch the bit field and just go for a generic 1-100000 enum sort of thing.
With that being said, I'm not entirely sure how I want to go about this pr. I guess i would double check that all regions still work, that theres not much lag with your new addition, and make both a warning/debuff datetime thingy.
1)I think that's the commit from the last pull request which had a config file rather than database entries. You declined config files, so I k0ed it. No idea why it came back. I'm a pr noob :/ 2)Alright. I was using player.SetBuff(buff, time), and was going by eye to try and get the buff to wear off approximately when it was renewed. As it is, I think the debuff time slowly gets higher.
In terms of the second paragraph, that sounds pretty cool. I'd enjoy working with something like that.
Last paragraph: I (think) I tested it fairly thoroughly, although I was only checking the banned items regions, and not whether other flags still worked. If you want, I can do that any time.
Thanks for feedback :)
Hope you dont mind me not merging this, i feel bad. By the time i decided to fuck rewriting it, I had ported to 1.2 and it was no longer mergable. Feel free to fix/add shit to this version if you think it needs it ;)
No probs dude, if I find time I'll try and do it a bit better anyway. Heck, if I find time I can help with a re-write if you really want
Well, it's been a month or two but I finally found time and fixed it. No flat files! All databasified, with commands in-game to add items to the region's list, as well as commands to remove from the list and to check the list for each region