Skip to content

Not pulling actual item numbers for gear equipped. (Azerothcore) #2

@Arcazulus

Description

@Arcazulus

while using this module with Azerothcore, the gear equipped is not correct. The reason behind this is the code is looking in character_inventory.item for the item number. The actual number for items is stored in item_instance.itemEntry. the thing is, we do need the current number that is being pulled from character_inventory.item, as it references to item_instance.guid. and then finally the proper item number is found in item_instance.itemEntry. I tried creating a join. but my coding abilities are trash at best.

this is what I came up with, but obviously it doesn't work. so if someone that knows more can assist in actual functioning join.

Armory_model.php

public function getCharInvHead($MultiRealm, $id)
{
	$this->multirealm = $MultiRealm;
    $this->multirealm->select('item')->where('guid',$id)->where('bag','0')->where('slot','0')->get('character_inventory');
    $this->multirealm->join('item_instance', 'item_instance.guid = character_inventory.item');
    $this->multirealm->where('guid','item'); 
    $query = $this->multirealm->get();
    return $query->result();
 }

I was then thinking I could reference itemEntry field in view.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions