Sphereserver / Source-X

Ultima Online server emulator
Apache License 2.0
58 stars 47 forks source link

f_onchar_create_init dosnt work #1117

Closed Tolokio closed 1 year ago

Tolokio commented 1 year ago

as title said. It dosnt work.

image

f_onchar_create does work

image

I think it dosnt work cos it is called from Client and client is always 0 on any serv_trigger

Tolokio commented 1 year ago

image

This check never get fired, we could remove it cos it is not needed anyway. This is what happening if u try to create a new character image

And it denys character's creation.

image epictestadore is not the character i was trying to create.

drk84 commented 1 year ago

f_onchar_create_init doesn't work because the 2nd parameter is null, it should be pChar or &gServ. When you do serv.log it tries to call the command on the 2nd parameter, but because there are no object nothing is displayed (it actually trhrows a warning)

xwerswoodx commented 1 year ago

&g_Serv is probably better choice here, while pChar is initialized after this function triggered.