The $object_class in r8560

Wrote new code? Fixed a bug? Want to discuss technical stuff? Feel free to post it here.

Moderator: Moderators

Message
Author
sofax222
Developers
Developers
Posts: 214
Joined: 24 Nov 2010, 03:08
Noob?: Yes

The $object_class in r8560

#1 Post by sofax222 »

The $object_class got "undef" form the codes:

Code: Select all

$object_class = {
        PC_TYPE => 'Actor::Player',
        # NPC_TYPE? # not encountered, NPCs are NPC_EVT_TYPE
        # SKILL_TYPE? # not encountered
        # UNKNOWN_TYPE? # not encountered
        NPC_MOB_TYPE => 'Actor::Monster',
        NPC_EVT_TYPE => 'Actor::NPC', # both NPCs and portals
        NPC_PET_TYPE => 'Actor::Pet',
        NPC_HO_TYPE => 'Actor::Slave',
        # NPC_MERSOL_TYPE? # not encountered
        # NPC_ELEMENTAL_TYPE? # not encountered
}->{$args->{object_type}};
when the $args->{object_type} is defined !!

sofax222
Developers
Developers
Posts: 214
Joined: 24 Nov 2010, 03:08
Noob?: Yes

Re: The $object_class in r8560

#2 Post by sofax222 »

It should be changed to:

Code: Select all

$object_class = {
        Network::Receive::PC_TYPE => 'Actor::Player',
        # NPC_TYPE? # not encountered, NPCs are NPC_EVT_TYPE
        # SKILL_TYPE? # not encountered
        # UNKNOWN_TYPE? # not encountered
        Network::Receive::NPC_MOB_TYPE => 'Actor::Monster',
        Network::Receive::NPC_EVT_TYPE => 'Actor::NPC', # both NPCs and portals
        Network::Receive::NPC_PET_TYPE => 'Actor::Pet',
        Network::Receive::NPC_HO_TYPE => 'Actor::Slave',
        # NPC_MERSOL_TYPE? # not encountered
        # NPC_ELEMENTAL_TYPE? # not encountered
}->{$args->{object_type}};

iMikeLance
Moderators
Moderators
Posts: 208
Joined: 01 Feb 2010, 17:37
Noob?: No
Location: Brazil - MG
Contact:

Re: The $object_class in r8560

#3 Post by iMikeLance »

Revision: 8571
Author: marcelofoxes
Date: quarta-feira, 15 de maio de 2013 09:04:28
Message:
* fixed incorrect constants access, actors should be identified correctly now. thanks sofax222
----
Modified : /openkore/trunk/src/Network/Receive.pm

Post Reply