SphereServer BugTracker - SphereServer
View Issue Details
0002252SphereServernew feature requestpublic24-12-13 00:0224-12-13 20:47
Bubonic Pestilence 
Ben 
normalfeaturealways
closedno change required 
16-06-2013, 0.56b Prerelease 
 
Not Available
None
None
0002252: Inheritance for items/chars
Hello Devs.

Current Situation:
[chardef t1]
id c_troll

on=@create
  color 36

[chardef t2]
id t1

on=@create
  color 48

If you do .add t1, it will be shown as troll and it will inherit troll's properties.
But if you do .add t2, it will show error in console and c_man will be added.

What i'm asking for, is... it's already XXI century, century of OOP, give us ability to inherit properties, triggers, events & etc.

something like:

[chardef c_llama_newbie]
id c_llama
name Newbie Llama, Uncolored

on=@death
  src.consume 10000 i_gold

[chardef c_llama_newbie_colored]
id c_llama_newbie
name Colored Newbie Llama

on=@death
  super // triggers parent's @death trigger
  src.consume 5000 i_gold // additional 5k, total 15k for using colored

[chardef c_llama_newbie_colored_mana]
id c_llama_newbie_colored
name Colored Newbie Llama with Mana Reg

on=@mount
  src.events +mana_reg

Don't you think it "slightly" shorter than copying all triggers/props from "parent" llamas? )
No tags attached.
Issue History
24-12-13 00:02Bubonic PestilenceNew Issue
24-12-13 14:00BenNote Added: 0001866
24-12-13 16:34Bubonic PestilenceNote Added: 0001867
24-12-13 16:40Bubonic PestilenceNote Edited: 0001867bug_revision_view_page.php?bugnote_id=0001867#r550
24-12-13 20:47BenNote Added: 0001868
24-12-13 20:47BenStatusnew => closed
24-12-13 20:47BenAssigned To => Ben
24-12-13 20:47BenResolutionopen => no change required

Notes
(0001866)
Ben   
24-12-13 14:00   
right... cuz copy/paste is such a hard task...

what if you don't want a certain property to be inherited? then your stuck setting those to something else.
I really don't see a need for this.
(0001867)
Bubonic Pestilence   
24-12-13 16:34   
(edited on: 24-12-13 16:40)
It's all about how detailed your subclasses.

like:

c_man > c_elf > c_elf_on_horse > c_elf_on_horse_with_mace
but if you want elf without horse, you can do this:
c_man > c_elf > c_elf_with_sword

And... IMHO... if you're prefering c&p... i think you're not good person to discuss developing patterns...

(0001868)
Ben   
24-12-13 20:47   
Really? You think that was wise?