AnnieRuru 957 Posted September 13, 2014 (edited) /* HPData handy redirects *//* session[] */#define addToSession(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_SESSION,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromSession(ptr,index) (HPMi->getFromHPData(HPDT_SESSION,HPMi->pid,(ptr),(index)))#define removeFromSession(ptr,index) (HPMi->removeFromHPData(HPDT_SESSION,HPMi->pid,(ptr),(index)))/* map_session_data */#define addToMSD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_MSD,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromMSD(ptr,index) (HPMi->getFromHPData(HPDT_MSD,HPMi->pid,(ptr),(index)))#define removeFromMSD(ptr,index) (HPMi->removeFromHPData(HPDT_MSD,HPMi->pid,(ptr),(index)))/* npc_data */#define addToNPCD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_NPCD,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromNPCD(ptr,index) (HPMi->getFromHPData(HPDT_NPCD,HPMi->pid,(ptr),(index)))#define removeFromNPCD(ptr,index) (HPMi->removeFromHPData(HPDT_NPCD,HPMi->pid,(ptr),(index)))/* map_data */#define addToMAPD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_MAP,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromMAPD(ptr,index) (HPMi->getFromHPData(HPDT_MAP,HPMi->pid,(ptr),(index)))#define removeFromMAPD(ptr,index) (HPMi->removeFromHPData(HPDT_MAP,HPMi->pid,(ptr),(index)))/* party_data */#define addToPAD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_PARTY,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromPAD(ptr,index) (HPMi->getFromHPData(HPDT_PARTY,HPMi->pid,(ptr),(index)))#define removeFromPAD(ptr,index) (HPMi->removeFromHPData(HPDT_PARTY,HPMi->pid,(ptr),(index)))/* guild */#define addToGLD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_GUILD,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromGLD(ptr,index) (HPMi->getFromHPData(HPDT_GUILD,HPMi->pid,(ptr),(index)))#define removeFromGLD(ptr,index) (HPMi->removeFromHPData(HPDT_GUILD,HPMi->pid,(ptr),(index)))/* instance_data */#define addToINSTD(ptr,data,index,autofree) (HPMi->addToHPData(HPDT_INSTANCE,HPMi->pid,(ptr),(data),(index),(autofree)))#define getFromINSTD(ptr,index) (HPMi->getFromHPData(HPDT_INSTANCE,HPMi->pid,(ptr),(index)))#define removeFromINSTD(ptr,index) (HPMi->removeFromHPData(HPDT_INSTANCE,HPMi->pid,(ptr),(index)))where is item_data and mob_data ? if allow to item_data, we can do something like this Cydh did allows item data to have optional field, which can do the following - restrict GM from create the item - restrict GM from refine the item ... some other idea if allow to mob_data, allow monster to do the following like mob_controller - restrict player from hitting the mob ( mob->invincible ) - create a monster that no random walk ( it stand still until being attack ) ... some other idea Edited September 13, 2014 by AnnieRuru 3 Dastgir, GmOcean and evilpuncker reacted to this Quote Share this post Link to post Share on other sites
evilpuncker 503 Posted September 13, 2014 +1 to this, btw the first link on your post is undefined Quote Share this post Link to post Share on other sites
Dastgir 1246 Posted September 14, 2014 +1 , I remember ind saying, if someone needs some struct to be integrated with plugin, he will code for that structs. Quote Share this post Link to post Share on other sites
GmOcean 92 Posted September 17, 2014 +1, I see no reason NOT to have it. Also, it'll be nice to add these in to improve the variety of plugins that can be made. Quote Share this post Link to post Share on other sites
AnnieRuru 957 Posted September 19, 2014 (edited) pull request https://github.com/HerculesWS/Hercules/pull/362 tested with http://upaste.me/75e9a3 just noticed mob_db and mob_data are actually different so just add them both mob_db is similar to item_data, where it points to the `item_db` or `mob_db` database mob_db uses mob_id range 1001~4000 mob_data is the GID of the monster, so this one is made for individual monster manipulation mob_data create GID of the monster start from 100000000 Edited September 20, 2014 by AnnieRuru Quote Share this post Link to post Share on other sites