planqi / slashdiablo-maphack

A customized maphack for the slashdiablo D2 server
GNU Affero General Public License v3.0
88 stars 42 forks source link

Skill charges support #33

Closed youbetterdont closed 4 years ago

youbetterdont commented 4 years ago

Added support for filtering items based on skill charges. The new keyword is CHSK and is used much the same way as SK.

line for readme:

Edit 1: Just thought of something. I didn’t check how the condition objects are freed. They are created with a naked new. I’ll try to remember to check this later, or just let me know if this is already handled somewhere else.

Edit 2: I think there's a memory leak here. Doesn't seem like anything is deleting the created conditions or rules. I think we should change everything to use unique_ptr. Other option is to free stuff in UninitializeItemRules(), but it's not as clean. Considering I didn't add any new memory leak, maybe we leave this fix for another PR.