1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
#ifndef PC_HPP
#define PC_HPP
# include "pc.t.hpp"
# include "../strings/fwd.hpp"
# include "clif.t.hpp"
# include "map.hpp"
inline
void pc_setsit(dumb_ptr<map_session_data> sd)
{
sd->state.dead_sit = 2;
}
//pc_setstand(dumb_ptr<map_session_data> sd) is a normal function
inline
bool pc_isdead(dumb_ptr<map_session_data> sd)
{
return sd->state.dead_sit == 1;
}
inline
bool pc_issit(dumb_ptr<map_session_data> sd)
{
return sd->state.dead_sit == 2;
}
inline
void pc_setdir(dumb_ptr<map_session_data> sd, DIR b)
{
sd->dir = (b);
}
inline
bool pc_isinvisible(dumb_ptr<map_session_data> sd)
{
return bool(sd->status.option & Option::HIDE);
}
inline
bool pc_is90overweight(dumb_ptr<map_session_data> sd)
{
return sd->weight*10 >= sd->max_weight*9;
}
// Checks all npcs/warps at the same location to see whether they
// should do something with the specified player.
void pc_touch_all_relevant_npcs(dumb_ptr<map_session_data> sd);
uint8_t pc_isGM(dumb_ptr<map_session_data> sd);
int pc_iskiller(dumb_ptr<map_session_data> src, dumb_ptr<map_session_data> target); // [MouseJstr]
void pc_invisibility(dumb_ptr<map_session_data> sd, int enabled); // [Fate]
int pc_counttargeted(dumb_ptr<map_session_data> sd, dumb_ptr<block_list> src,
ATK target_lv);
int pc_setrestartvalue(dumb_ptr<map_session_data> sd, int type);
void pc_makesavestatus(dumb_ptr<map_session_data>);
int pc_setnewpc(dumb_ptr<map_session_data>, int, int, int, tick_t, SEX);
int pc_authok(int, int, TimeT, short tmw_version, const CharKey *, const CharData *);
int pc_authfail(int accid);
EPOS pc_equippoint(dumb_ptr<map_session_data> sd, int n);
int pc_checkskill(dumb_ptr<map_session_data> sd, SkillID skill_id);
int pc_checkequip(dumb_ptr<map_session_data> sd, EPOS pos);
int pc_walktoxy(dumb_ptr<map_session_data>, int, int);
int pc_stop_walking(dumb_ptr<map_session_data>, int);
int pc_movepos(dumb_ptr<map_session_data>, int, int);
int pc_setpos(dumb_ptr<map_session_data>, MapName, int, int, BeingRemoveWhy);
void pc_setsavepoint(dumb_ptr<map_session_data>, MapName, int, int);
int pc_randomwarp(dumb_ptr<map_session_data> sd, BeingRemoveWhy type);
ADDITEM pc_checkadditem(dumb_ptr<map_session_data>, int, int);
int pc_inventoryblank(dumb_ptr<map_session_data>);
int pc_search_inventory(dumb_ptr<map_session_data> sd, int item_id);
int pc_payzeny(dumb_ptr<map_session_data>, int);
PickupFail pc_additem(dumb_ptr<map_session_data>, struct item *, int);
int pc_getzeny(dumb_ptr<map_session_data>, int);
int pc_delitem(dumb_ptr<map_session_data>, int, int, int);
int pc_checkitem(dumb_ptr<map_session_data>);
int pc_count_all_items(dumb_ptr<map_session_data> player, int item_id);
int pc_remove_items(dumb_ptr<map_session_data> player,
int item_id, int count);
int pc_takeitem(dumb_ptr<map_session_data>, dumb_ptr<flooritem_data>);
int pc_dropitem(dumb_ptr<map_session_data>, int, int);
int pc_checkweighticon(dumb_ptr<map_session_data> sd);
int pc_calcstatus(dumb_ptr<map_session_data>, int);
int pc_bonus(dumb_ptr<map_session_data>, SP, int);
int pc_bonus2(dumb_ptr<map_session_data> sd, SP, int, int);
int pc_skill(dumb_ptr<map_session_data>, SkillID, int, int);
int pc_attack(dumb_ptr<map_session_data>, int, int);
int pc_stopattack(dumb_ptr<map_session_data>);
int pc_gainexp_reason(dumb_ptr<map_session_data>, int, int,
PC_GAINEXP_REASON reason);
int pc_extract_healer_exp(dumb_ptr<map_session_data>, int max); // [Fate] Used by healers: extract healer-xp from the target, return result (up to max)
int pc_nextbaseexp(dumb_ptr<map_session_data>);
int pc_nextjobexp(dumb_ptr<map_session_data>);
int pc_need_status_point(dumb_ptr<map_session_data>, SP);
int pc_statusup(dumb_ptr<map_session_data>, SP);
int pc_statusup2(dumb_ptr<map_session_data>, SP, int);
int pc_skillup(dumb_ptr<map_session_data>, SkillID);
int pc_resetlvl(dumb_ptr<map_session_data>, int type);
int pc_resetstate(dumb_ptr<map_session_data>);
int pc_resetskill(dumb_ptr<map_session_data>);
int pc_equipitem(dumb_ptr<map_session_data>, int, EPOS);
int pc_unequipitem(dumb_ptr<map_session_data>, int, CalcStatus);
int pc_unequipinvyitem(dumb_ptr<map_session_data>, int, CalcStatus);
int pc_useitem(dumb_ptr<map_session_data>, int);
int pc_damage(dumb_ptr<block_list>, dumb_ptr<map_session_data>, int);
int pc_heal(dumb_ptr<map_session_data>, int, int);
int pc_itemheal(dumb_ptr<map_session_data> sd, int hp, int sp);
int pc_percentheal(dumb_ptr<map_session_data> sd, int, int);
int pc_setoption(dumb_ptr<map_session_data>, Option);
int pc_changelook(dumb_ptr<map_session_data>, LOOK, int);
int pc_readparam(dumb_ptr<map_session_data>, SP);
int pc_setparam(dumb_ptr<map_session_data>, SP, int);
int pc_readreg(dumb_ptr<map_session_data>, SIR);
void pc_setreg(dumb_ptr<map_session_data>, SIR, int);
ZString pc_readregstr(dumb_ptr<map_session_data> sd, SIR reg);
void pc_setregstr(dumb_ptr<map_session_data> sd, SIR reg, RString str);
int pc_readglobalreg(dumb_ptr<map_session_data>, VarName );
int pc_setglobalreg(dumb_ptr<map_session_data>, VarName , int);
int pc_readaccountreg(dumb_ptr<map_session_data>, VarName );
int pc_setaccountreg(dumb_ptr<map_session_data>, VarName , int);
int pc_readaccountreg2(dumb_ptr<map_session_data>, VarName );
int pc_setaccountreg2(dumb_ptr<map_session_data>, VarName , int);
int pc_addeventtimer(dumb_ptr<map_session_data> sd, interval_t tick,
NpcEvent name);
int pc_cleareventtimer(dumb_ptr<map_session_data> sd);
int pc_calc_pvprank(dumb_ptr<map_session_data> sd);
void pc_calc_pvprank_timer(TimerData *, tick_t, int);
int pc_marriage(dumb_ptr<map_session_data> sd,
dumb_ptr<map_session_data> dstsd);
int pc_divorce(dumb_ptr<map_session_data> sd);
dumb_ptr<map_session_data> pc_get_partner(dumb_ptr<map_session_data> sd);
void pc_set_gm_level(int account_id, uint8_t level);
void pc_setstand(dumb_ptr<map_session_data> sd);
void pc_cleanup(dumb_ptr<map_session_data> sd); // [Fate] Clean up after a logged-out PC
int pc_read_gm_account(Session *);
int pc_setinvincibletimer(dumb_ptr<map_session_data> sd, interval_t);
int pc_delinvincibletimer(dumb_ptr<map_session_data> sd);
int pc_logout(dumb_ptr<map_session_data> sd); // [fate] Player logs out
void pc_show_motd(dumb_ptr<map_session_data> sd);
void do_init_pc(void);
#endif // PC_HPP
|