Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hooked up the IdentifyObject event and returned a debug string. #305

Merged
merged 8 commits into from
May 2, 2017
Merged

Conversation

OptimShi
Copy link
Collaborator

Also added the flags for when we get to the point we are passing actual data.

changelog.md Outdated
* Added IdentifyResponseFlags, for when we start to send actual data.
* Added a basic debug string to any ID. It simply returns the objects GUID.

### 2017-04-26
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

combine

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, sorry, the date needs to be changed not combined. My bad.

// Write a simple debug strings. Thanks to Pea for this idea.
Writer.Write(1u + (1 << 16)); // One String, + table size
Writer.Write(16u); // Long Description String
Writer.WriteString16L("This item has a guid of " + objectID.ToString() + " (0x" + objectID.ToString("X") + ")");
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

end on new line please

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way to add this to the StyleCop settings? It didn't throw up any alert on this. I have made a mental note, however, for the future.

ResistEnchantmentBitfield = 0x400,
ArmorLevels = 0x4000,
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new line here as well

@OptimShi
Copy link
Collaborator Author

Per discussion, I modified this to only spit out debug info on "DebugObjects" (as opposed to proper WorldObjects, which as of now are players, life stones and portals.) Also added the WeenieClassId for further debugging fun (which required modifying how this works a little bit, but all for the best)

Copy link
Contributor

@Mogwai-TheFurry Mogwai-TheFurry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor stuff. Let me know.

@@ -477,6 +477,13 @@ public void UseTime()
QueuedGameAction action = player.ActionQueuePop();
if (action != null)
HandleGameAction(action, player);
else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we'd only process the Examination Queue when there wasn't a pending action? I don't get the point of putting this in an else block.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a way of giving lower priority to the examine request and also ensure only one action is performed per "tick" so as not to try and do too much at once. Can just as easily modify it to try and perform both an GameAction and an ExamineAction, if any, though.

@@ -596,6 +603,18 @@ private void HandleGameAction(QueuedGameAction action, Player player)
HandleSoundEvent(obj, soundEffect);
break;
}
case GameActionType.IdentifyObject:
{
var g = new ObjectGuid(action.ObjectId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we know the retail servers throttled this, we might want to put a "TODO" comment here to that effect.

…n 'else' statement) and a note for a future TODO task.
…n 'else' statement) and a note for a future TODO task.
@Mogwai-TheFurry Mogwai-TheFurry merged commit b9ce86d into ACEmulator:master May 2, 2017
@OptimShi OptimShi deleted the Examine branch July 10, 2017 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants