Skip to content

Commit

Permalink
Merge pull request #66 from builder-247/master
Browse files Browse the repository at this point in the history
Fix cosmetics
  • Loading branch information
howardchung authored Dec 3, 2023
2 parents eb9f5bf + adcefd3 commit 4937d1a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main/java/opendota/Parse.java
Original file line number Diff line number Diff line change
Expand Up @@ -466,13 +466,10 @@ public void onEntityEntered(Context ctx, Entity e) {
if (e.getDtClass().getDtName().equals("CDOTAWearableItem")) {
Integer accountId = getEntityProperty(e, "m_iAccountID", null);
Integer itemDefinitionIndex = getEntityProperty(e, "m_iItemDefinitionIndex", null);
Integer ownerHandle = getEntityProperty(e, "m_hOwnerEntity", null);
Entity owner = ownerHandle != null ? ctx.getProcessor(Entities.class).getByHandle(ownerHandle) : null;
//System.err.format("%s,%s\n", accountId, itemDefinitionIndex);
if (accountId > 0 && owner != null)
if (accountId > 0)
{
// Get the owner (a hero entity)
Integer playerId = getEntityProperty(owner, "m_iPlayerID", null);
Long accountId64 = 76561197960265728L + accountId;
Integer playerSlot = steamid_to_playerslot.get(accountId64);
cosmeticsMap.put(itemDefinitionIndex, playerSlot);
Expand Down

0 comments on commit 4937d1a

Please sign in to comment.