@@ -15,7 +15,7 @@ impl PlayerRenderer {
15
15
pub fn new ( ) -> PlayerRenderer {
16
16
// exact move does not get cached, that is built on demand.
17
17
return PlayerRenderer {
18
- caches : vec ! [ vec![ None ; 2048 ] ; 8 ] ,
18
+ caches : vec ! [ vec![ None ; 2048 ] ; 9 ] ,
19
19
highs : [ 0 ; 2048 ] ,
20
20
lows : [ 0 ; 2048 ] ,
21
21
}
@@ -81,6 +81,18 @@ impl PlayerRenderer {
81
81
PlayerInfoProt :: DAMAGE ,
82
82
) ;
83
83
}
84
+ if masks & PlayerInfoProt :: DAMAGE2 as u32 != 0 {
85
+ highs += self . cache (
86
+ pid,
87
+ & PlayerInfoDamage :: new (
88
+ player. damage_taken2 ,
89
+ player. damage_type2 ,
90
+ player. current_hitpoints ,
91
+ player. base_hitpoints ,
92
+ ) ,
93
+ PlayerInfoProt :: DAMAGE2 ,
94
+ ) ;
95
+ }
84
96
if masks & PlayerInfoProt :: FACE_COORD as u32 != 0 {
85
97
let len: usize = self . cache (
86
98
pid,
@@ -196,6 +208,7 @@ impl PlayerRenderer {
196
208
PlayerInfoProt :: FACE_ENTITY . to_index ( ) ,
197
209
PlayerInfoProt :: SAY . to_index ( ) ,
198
210
PlayerInfoProt :: DAMAGE . to_index ( ) ,
211
+ PlayerInfoProt :: DAMAGE2 . to_index ( ) ,
199
212
PlayerInfoProt :: FACE_COORD . to_index ( ) ,
200
213
PlayerInfoProt :: CHAT . to_index ( ) ,
201
214
PlayerInfoProt :: SPOT_ANIM . to_index ( ) ,
@@ -244,7 +257,7 @@ impl NpcRenderer {
244
257
#[ inline]
245
258
pub fn new ( ) -> NpcRenderer {
246
259
return NpcRenderer {
247
- caches : vec ! [ vec![ None ; 8192 ] ; 7 ] ,
260
+ caches : vec ! [ vec![ None ; 8192 ] ; 8 ] ,
248
261
highs : [ 0 ; 8192 ] ,
249
262
lows : [ 0 ; 8192 ] ,
250
263
}
@@ -301,6 +314,18 @@ impl NpcRenderer {
301
314
NpcInfoProt :: DAMAGE ,
302
315
) ;
303
316
}
317
+ if masks & NpcInfoProt :: DAMAGE2 as u32 != 0 {
318
+ highs += self . cache (
319
+ nid,
320
+ & NpcInfoDamage :: new (
321
+ npc. damage_taken2 ,
322
+ npc. damage_type2 ,
323
+ npc. current_hitpoints ,
324
+ npc. base_hitpoints ,
325
+ ) ,
326
+ NpcInfoProt :: DAMAGE2 ,
327
+ ) ;
328
+ }
304
329
if masks & NpcInfoProt :: CHANGE_TYPE as u32 != 0 {
305
330
highs += self . cache (
306
331
nid,
@@ -385,6 +410,7 @@ impl NpcRenderer {
385
410
NpcInfoProt :: FACE_ENTITY . to_index ( ) ,
386
411
NpcInfoProt :: SAY . to_index ( ) ,
387
412
NpcInfoProt :: DAMAGE . to_index ( ) ,
413
+ NpcInfoProt :: DAMAGE2 . to_index ( ) ,
388
414
NpcInfoProt :: CHANGE_TYPE . to_index ( ) ,
389
415
NpcInfoProt :: SPOT_ANIM . to_index ( ) ,
390
416
NpcInfoProt :: FACE_COORD . to_index ( ) ,
0 commit comments