SphereServer BugTracker - SphereServer
View Issue Details
0002223SphereServernew feature requestpublic19-10-13 01:3519-10-13 05:04
Coruja 
Ben 
normalminorN/A
closedno change required 
 
 
Not Available
None
None
0002223: TAG inherit on shrink
On latest nightly I saw something about shrink on changelog and I had a new idea: make the SHRINK function inherit TAGS from the pet.

It will create the NPC icon with the same tags from the NPC, and when dclick on t_figurine, the created NPC will inherit it again
this would be usefull for ppl like me which needs a huge workaround just to inherit simple tags, like this:

[FUNCTION lol]
...
CALL f_shrink
NEW.CONT=<SRC.FINDLAYER.21>
...

[FUNCTION Shrink2]
SERV.NEWITEM <ICON>
NEW.COLOR=<COLOR>
NEW.NAME=<NAME>
NEW.MORE1=<BASEID>
NEW.TYPE=t_figurine
NEW.TAG.Barding.Points=<TAG.Barding.Points>
NEW.TAG.Barding.Exceptional=<TAG.Barding.Exceptional>
NEW.P=


NEW.UPDATE
REMOVE

[TYPEDEF t_figurine]
ON=@DClick
IF (<TOPOBJ> != <SRC>)
 SRC.SYSMESSAGE @,,1 The item must be with you.
 return 1
ELIF (<SERV.MountHeight>)
 SRC.HEIGHT=<DEF0.height_<HVAL <MORE>>>
 IF !(<SRC.ISVERTICALSPACE>)
  SRC.SYSMESSAGE @,,1 The creature is too tall to fit this location.
  SRC.HEIGHT=
  return 1
 ENDIF
 SRC.HEIGHT=
ENDIF
SERV.NEWNPC <QVAL (<MORE>)? <HVAL <MORE>>:<TDATA3>>
REF1=<NEW>
SERV.NEWITEM i_memory
NEW.COLOR 02
NEW.LINK=<SRC>
NEW.CONT=<REF1>
REF1.TAG.Barding.Points=<TAG.Barding.Points>
REF1.TAG.Barding.Exceptional=<TAG.Barding.Exceptional>
REF1.NAME=<NAME>
REF1.COLOR=<COLOR>
REF1.P=<SRC.P>
REF1.UPDATE
REMOVE
return 1


Using inherit tags, this huge code will be reduced to just 2 lines:

[FUNCTION lol]
...
SHRINK
ACT.CONT=<SRC.FINDLAYER.21>
...

No tags attached.
Issue History
19-10-13 01:35CorujaNew Issue
19-10-13 01:47BenNote Added: 0001736
19-10-13 04:04CorujaNote Added: 0001738
19-10-13 05:04BenStatusnew => closed
19-10-13 05:04BenAssigned To => Ben
19-10-13 05:04BenResolutionopen => no change required

Notes
(0001736)
Ben   
19-10-13 01:47   
I don't see the point here... With default shrink, the pet is not removed so it keeps it's tags when unshrunk.
(0001738)
Coruja   
19-10-13 04:04   
roflmao, I never noticed this, maybe it's because I'm already using my shrink workaround for ages

So I think its better continue using my workaround, it's a bad idea transform 90.000 items (shrinked mounts) into 90.000 items + 90.000 offline NPCs :(