-
Notifications
You must be signed in to change notification settings - Fork 241
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
Conversation
…ects. Makes it work, but not sure if that's always consistent in those values.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
combine
There was a problem hiding this comment.
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") + ")"); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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, | ||
} | ||
} |
There was a problem hiding this comment.
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
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) |
There was a problem hiding this 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.
Source/ACE/Entity/Landblock.cs
Outdated
@@ -477,6 +477,13 @@ public void UseTime() | |||
QueuedGameAction action = player.ActionQueuePop(); | |||
if (action != null) | |||
HandleGameAction(action, player); | |||
else |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Source/ACE/Entity/Landblock.cs
Outdated
@@ -596,6 +603,18 @@ private void HandleGameAction(QueuedGameAction action, Player player) | |||
HandleSoundEvent(obj, soundEffect); | |||
break; | |||
} | |||
case GameActionType.IdentifyObject: | |||
{ | |||
var g = new ObjectGuid(action.ObjectId); |
There was a problem hiding this comment.
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.
Also added the flags for when we get to the point we are passing actual data.