Skip to content

Commit 986e8de

Browse files
XuNXuN
XuN
authored and
XuN
committed
Added some NotoUpdates in the source, also modified sphere_genericstone_functions.scp, sphere_guild_functions.scp and sphere_town_functions.scp to reflect noto changes when joining/leaving.
1 parent d8d56ce commit 986e8de

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

stones/guilds/sphere_guild_functions.scp

+8
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ endif
8686
if (!<ref2.isdspeech.<def.GUILDCFGSPEECH_NAME>>)
8787
ref2.dspeech +<def.GUILDCFGSPEECH_NAME>
8888
endif
89+
ref2.NotoUpdate
8990

9091
// ------------------------------------------------------
9192
[FUNCTION f_guildsys_removecharfromguild]
@@ -103,6 +104,7 @@ endif
103104

104105
ref1.resign <ref2.uid>
105106
f_guildsys_sendsmsg <ref1.uid>,<ref2.name> has resigned from the guild.
107+
ref2.NotoUpdate
106108

107109
// ------------------------------------------------------
108110
[FUNCTION f_guildsys_isnameused]
@@ -244,6 +246,9 @@ elseif (<argv[2]> == 2)
244246
f_guildsys_sendsmsg <local.seconduid>,Your guild has received a war invitation from <uid.<local.firstuid>.name> <qval (strlen(<uid.<local.firstuid>.abbrev>)) ? [<uid.<local.firstuid>.abbrev>]:>
245247
endif
246248

249+
f_stonesys_updatenoto <argv0>
250+
f_stonesys_updatenoto <argv1>
251+
247252
return 1
248253

249254

@@ -264,6 +269,9 @@ If (<argv[2]> != 0)
264269
f_guildsys_sendsmsg <local.seconduid>,You are now at peace with <uid.<local.firstuid>.name> [<uid.<local.firstuid>.abbrev>]
265270
endif
266271

272+
f_stonesys_updatenoto <argv0>
273+
f_stonesys_updatenoto <argv1>
274+
267275
return 1
268276

269277
// ------------------------------------------------------

stones/sphere_genericstone_functions.scp

+17
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,23 @@ endif
148148

149149
return <local.typename>
150150

151+
// ------------------------------------------------------
152+
153+
[function f_stonesys_updatenoto]
154+
ref1 = <argv[0]> // The stone
155+
if (<ref1.IsChar>)
156+
return 0
157+
endif
158+
If ((<ref1.type>!=t_stone_guild) && (<ref1.type>!=t_stone_town))
159+
return 0
160+
endif
161+
for member 0 <eval <ref1.member.count> - 1>
162+
ref10 = <ref1.member.<dlocal.member>>
163+
if (<ref10.IsOnline>)
164+
ref10.NotoUpdate
165+
endif
166+
endfor
167+
151168
// ------------------------------------------------------
152169
// ------- Hardcoded functions called by Sphere -------
153170
// ------------------------------------------------------

stones/towns/sphere_town_functions.scp

+8
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ endif
8686
if (!<ref2.isdspeech.<def.TOWNSCFGSPEECH_NAME>>)
8787
ref2.dspeech +<def.TOWNSCFGSPEECH_NAME>
8888
endif
89+
ref1.NotoUpdate
8990

9091
// ------------------------------------------------------
9192
[FUNCTION f_townsys_removecharfromtown]
@@ -102,6 +103,7 @@ if (<ref2.isdspeech.<def.TOWNSCFGSPEECH_NAME>>)
102103
endif
103104

104105
ref1.resign <ref2.uid>
106+
ref1.NotoUpdate
105107
f_townsys_sendsmsg <ref1.uid>,<ref2.name> has resigned from the town.
106108

107109
// ------------------------------------------------------
@@ -242,6 +244,9 @@ elseif (<argv[2]> == 2)
242244
f_townsys_sendsmsg <local.seconduid>,Your town has received a war invitation from <uid.<local.firstuid>.name> <qval (strlen(<uid.<local.firstuid>.abbrev>)) ? [<uid.<local.firstuid>.abbrev>]:>
243245
endif
244246

247+
f_stonesys_updatenoto <argv0>
248+
f_stonesys_updatenoto <argv1>
249+
245250
return 1
246251

247252

@@ -262,6 +267,9 @@ If (<argv[2]> != 0)
262267
f_townsys_sendsmsg <local.seconduid>,You are now at peace with <uid.<local.firstuid>.name> [<uid.<local.firstuid>.abbrev>]
263268
endif
264269

270+
f_stonesys_updatenoto <argv0>
271+
f_stonesys_updatenoto <argv1>
272+
265273
return 1
266274

267275
// ------------------------------------------------------

0 commit comments

Comments
 (0)