Cleaned struct tokens for map_session_data and status_change (#7490)

Fixes #7492
This commit is contained in:
Singe Horizontal
2022-12-16 19:16:29 +01:00
committed by GitHub
parent da375a04c1
commit 8eac71f57f
71 changed files with 3017 additions and 3017 deletions

View File

@@ -20,7 +20,7 @@
#include "intif.hpp"
#include "itemdb.hpp"
#include "log.hpp"
#include "map.hpp" // struct map_session_data
#include "map.hpp" // map_session_data
#include "packets.hpp"
#include "pc.hpp"
#include "pc_groups.hpp"
@@ -131,7 +131,7 @@ void do_reconnect_storage(void){
* @param sd : player
* @return 0:success, 1:fail
*/
int storage_storageopen(struct map_session_data *sd)
int storage_storageopen(map_session_data *sd)
{
nullpo_ret(sd);
@@ -239,7 +239,7 @@ static enum e_storage_add storage_canGetItem(struct s_storage *stor, int idx, in
* @param amount : quantity of items
* @return 0:success, 1:failed, 2:failed because of room or stack checks
*/
static int storage_additem(struct map_session_data* sd, struct s_storage *stor, struct item *it, int amount)
static int storage_additem(map_session_data* sd, struct s_storage *stor, struct item *it, int amount)
{
struct item_data *data;
int i;
@@ -303,7 +303,7 @@ static int storage_additem(struct map_session_data* sd, struct s_storage *stor,
* @param amount :number of item to remove
* @return 0:sucess, 1:fail
*/
int storage_delitem(struct map_session_data* sd, struct s_storage *stor, int index, int amount)
int storage_delitem(map_session_data* sd, struct s_storage *stor, int index, int amount)
{
if( stor->u.items_storage[index].nameid == 0 || stor->u.items_storage[index].amount < amount )
return 1;
@@ -332,7 +332,7 @@ int storage_delitem(struct map_session_data* sd, struct s_storage *stor, int ind
* @param amount : number of item to take
* @return 0:fail, 1:success
*/
void storage_storageadd(struct map_session_data* sd, struct s_storage *stor, int index, int amount)
void storage_storageadd(map_session_data* sd, struct s_storage *stor, int index, int amount)
{
enum e_storage_add result;
@@ -365,7 +365,7 @@ void storage_storageadd(struct map_session_data* sd, struct s_storage *stor, int
* @param amount : number of item to take
* @return 0:fail, 1:success
*/
void storage_storageget(struct map_session_data *sd, struct s_storage *stor, int index, int amount)
void storage_storageget(map_session_data *sd, struct s_storage *stor, int index, int amount)
{
unsigned char flag = 0;
enum e_storage_add result;
@@ -392,7 +392,7 @@ void storage_storageget(struct map_session_data *sd, struct s_storage *stor, int
* @param amount : number of item to take
* @return 0:fail, 1:success
*/
void storage_storageaddfromcart(struct map_session_data *sd, struct s_storage *stor, int index, int amount)
void storage_storageaddfromcart(map_session_data *sd, struct s_storage *stor, int index, int amount)
{
enum e_storage_add result;
nullpo_retv(sd);
@@ -429,7 +429,7 @@ void storage_storageaddfromcart(struct map_session_data *sd, struct s_storage *s
* @param amount : number of item to take
* @return 0:fail, 1:success
*/
void storage_storagegettocart(struct map_session_data* sd, struct s_storage *stor, int index, int amount)
void storage_storagegettocart(map_session_data* sd, struct s_storage *stor, int index, int amount)
{
unsigned char flag = 0;
enum e_storage_add result;
@@ -456,7 +456,7 @@ void storage_storagegettocart(struct map_session_data* sd, struct s_storage *sto
* Request to save storage
* @param sd: Player who has the storage
*/
void storage_storagesave(struct map_session_data *sd)
void storage_storagesave(map_session_data *sd)
{
nullpo_retv(sd);
@@ -468,7 +468,7 @@ void storage_storagesave(struct map_session_data *sd)
* @param sd: Player who has the storage
* @author [massdriller] / modified by [Valaris]
*/
void storage_storageclose(struct map_session_data *sd)
void storage_storageclose(map_session_data *sd)
{
nullpo_retv(sd);
@@ -493,7 +493,7 @@ void storage_storageclose(struct map_session_data *sd)
* 1: Character is quitting
* 2(x): Character is changing map-servers
*/
void storage_storage_quit(struct map_session_data* sd, int flag)
void storage_storage_quit(map_session_data* sd, int flag)
{
nullpo_retv(sd);
@@ -551,7 +551,7 @@ void storage_guild_delete(int guild_id)
* @param sd : player
* @return 0 : success, 1 : fail, 2 : no guild found
*/
char storage_guild_storageopen(struct map_session_data* sd)
char storage_guild_storageopen(map_session_data* sd)
{
struct s_storage *gstor;
@@ -606,7 +606,7 @@ char storage_guild_storageopen(struct map_session_data* sd)
return GSTORAGE_OPEN;
}
void storage_guild_log( struct map_session_data* sd, struct item* item, int16 amount ){
void storage_guild_log( map_session_data* sd, struct item* item, int16 amount ){
int i;
SqlStmt* stmt = SqlStmt_Malloc(mmysql_handle);
StringBuf buf;
@@ -636,7 +636,7 @@ void storage_guild_log( struct map_session_data* sd, struct item* item, int16 am
StringBuf_Destroy(&buf);
}
enum e_guild_storage_log storage_guild_log_read_sub( struct map_session_data* sd, std::vector<struct guild_log_entry>& log, uint32 max ){
enum e_guild_storage_log storage_guild_log_read_sub( map_session_data* sd, std::vector<struct guild_log_entry>& log, uint32 max ){
StringBuf buf;
int j;
@@ -707,7 +707,7 @@ enum e_guild_storage_log storage_guild_log_read_sub( struct map_session_data* sd
return GUILDSTORAGE_LOG_FINAL_SUCCESS;
}
enum e_guild_storage_log storage_guild_log_read( struct map_session_data* sd ){
enum e_guild_storage_log storage_guild_log_read( map_session_data* sd ){
std::vector<struct guild_log_entry> log;
enum e_guild_storage_log ret = storage_guild_log_read_sub( sd, log, MAX_GUILD_STORAGE_LOG_PACKET );
@@ -725,7 +725,7 @@ enum e_guild_storage_log storage_guild_log_read( struct map_session_data* sd ){
* @param amount : number of item to add
* @return True : success, False : fail
*/
bool storage_guild_additem(struct map_session_data* sd, struct s_storage* stor, struct item* item_data, int amount)
bool storage_guild_additem(map_session_data* sd, struct s_storage* stor, struct item* item_data, int amount)
{
struct item_data *id;
int i;
@@ -841,7 +841,7 @@ bool storage_guild_additem2(struct s_storage* stor, struct item* item, int amoun
* @param amount : number of item to delete
* @return True : success, False : fail
*/
bool storage_guild_delitem(struct map_session_data* sd, struct s_storage* stor, int n, int amount)
bool storage_guild_delitem(map_session_data* sd, struct s_storage* stor, int n, int amount)
{
nullpo_retr(1, sd);
nullpo_retr(1, stor);
@@ -870,7 +870,7 @@ bool storage_guild_delitem(struct map_session_data* sd, struct s_storage* stor,
* @param sd : player
* @param amount : number of item to delete
*/
void storage_guild_storageadd(struct map_session_data* sd, int index, int amount)
void storage_guild_storageadd(map_session_data* sd, int index, int amount)
{
struct s_storage *stor;
@@ -912,7 +912,7 @@ void storage_guild_storageadd(struct map_session_data* sd, int index, int amount
* @param amount : number of item to get
* @return 1:success, 0:fail
*/
void storage_guild_storageget(struct map_session_data* sd, int index, int amount)
void storage_guild_storageget(map_session_data* sd, int index, int amount)
{
struct s_storage *stor;
unsigned char flag = 0;
@@ -951,7 +951,7 @@ void storage_guild_storageget(struct map_session_data* sd, int index, int amount
* @param index : index of item in cart
* @param amount : number of item to transfer
*/
void storage_guild_storageaddfromcart(struct map_session_data* sd, int index, int amount)
void storage_guild_storageaddfromcart(map_session_data* sd, int index, int amount)
{
struct s_storage *stor;
@@ -985,7 +985,7 @@ void storage_guild_storageaddfromcart(struct map_session_data* sd, int index, in
* @param amount : number of item to transfer
* @return 1:fail, 0:success
*/
void storage_guild_storagegettocart(struct map_session_data* sd, int index, int amount)
void storage_guild_storagegettocart(map_session_data* sd, int index, int amount)
{
short flag;
struct s_storage *stor;
@@ -1055,7 +1055,7 @@ void storage_guild_storagesaved(int guild_id)
* Close storage for player then save it
* @param sd : player
*/
void storage_guild_storageclose(struct map_session_data* sd)
void storage_guild_storageclose(map_session_data* sd)
{
struct s_storage *stor;
@@ -1080,7 +1080,7 @@ void storage_guild_storageclose(struct map_session_data* sd)
* @param sd
* @param flag
*/
void storage_guild_storage_quit(struct map_session_data* sd, int flag)
void storage_guild_storage_quit(map_session_data* sd, int flag)
{
struct s_storage *stor;
@@ -1113,7 +1113,7 @@ void storage_guild_storage_quit(struct map_session_data* sd, int flag)
* Open premium storage
* @param sd Player
**/
void storage_premiumStorage_open(struct map_session_data *sd) {
void storage_premiumStorage_open(map_session_data *sd) {
nullpo_retv(sd);
sd->state.storage_flag = 3;
@@ -1130,7 +1130,7 @@ void storage_premiumStorage_open(struct map_session_data *sd) {
* @return 1:Success to request, 0:Failed
* @author [Cydh]
**/
bool storage_premiumStorage_load(struct map_session_data *sd, uint8 num, uint8 mode) {
bool storage_premiumStorage_load(map_session_data *sd, uint8 num, uint8 mode) {
nullpo_ret(sd);
if (sd->state.storage_flag)
@@ -1162,7 +1162,7 @@ bool storage_premiumStorage_load(struct map_session_data *sd, uint8 num, uint8 m
* @param sd Player who has the storage
* @author [Cydh]
**/
void storage_premiumStorage_save(struct map_session_data *sd) {
void storage_premiumStorage_save(map_session_data *sd) {
nullpo_retv(sd);
intif_storage_save(sd, &sd->premiumStorage);
@@ -1173,7 +1173,7 @@ void storage_premiumStorage_save(struct map_session_data *sd) {
* @param sd Player who has the storage
* @author [Cydh]
**/
void storage_premiumStorage_close(struct map_session_data *sd) {
void storage_premiumStorage_close(map_session_data *sd) {
nullpo_retv(sd);
if (sd->premiumStorage.dirty) {
@@ -1194,7 +1194,7 @@ void storage_premiumStorage_close(struct map_session_data *sd) {
* @param sd Player who has the storage
* @author [Cydh]
**/
void storage_premiumStorage_quit(struct map_session_data *sd) {
void storage_premiumStorage_quit(map_session_data *sd) {
nullpo_retv(sd);
if (save_settings&CHARSAVE_STORAGE)