OpenKore / OpenKore/openkore

ActorList and InventoryList conflict with Actor::Item

Open
#377 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

code cleaning discussion priority: low
Dominant language
Perl
Stars
1.5k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

There are two problems which need to be dealt with:

1 - assert(defined $item->{name}) in InventoryList::add is totally
unnecessary if $item->{name} is by default Uninitialized Item.

2 - assert(defined $actor->{ID}) in ActorList::add is totally
unnecessary if $item->{ID} is by default 0.

I suggest we remove the definitions of $self->{name} and $self->{ID} in Actor::Item.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating Actor::Item, InventoryList::add, and ActorList::add, then inspect how the name and ID fields are initialized and used. Verify whether the assertions are redundant and resolve the Actor::Item/List conflict described in the issue. Done means the defaults and assertions are consistent without changing unrelated behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
perl
Domain
backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.