-
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
Added lifestone attunment, @ls recall, and position fixes. #213
Added lifestone attunment, @ls recall, and position fixes. #213
Conversation
a00ea41
to
34abe01
Compare
Worked out the log4net problems and changed database logging Testing appveyor Reset debugging Updated changelog Changed Lifestone usage recall to the correct enum
34abe01
to
1530d36
Compare
@@ -78,8 +84,8 @@ public void AddPreparedStatement<T>(T id, params object[] parameters) | |||
} | |||
catch (MySqlException transactionException) | |||
{ | |||
Console.WriteLine($"An exception occured while commiting a transaction of {queries.Count} queries, a rollback will be performed!"); | |||
Console.WriteLine($"Exception: {transactionException.Message}"); | |||
log.Error($"An exception occured while commiting a transaction of {queries.Count} queries, a rollback will be performed!"); |
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.
Should this be set to Error channel? I believe it's more relevant to capture these exceptions as errors, if different logging levels are being utilized.
float dy = Math.Abs(landBlockObject.Position.PositionY - session.Player.Location.PositionY); | ||
float dz = Math.Abs(landBlockObject.Position.PositionZ - session.Player.Location.PositionZ); | ||
|
||
// check if the distance is greater then |
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.
This should use 3D pythagorean math, not checks on individual axis components. It will work, but it's logically incorrect.
var objectId = new ObjectGuid(fullId); | ||
|
||
// get the worldobject from the id, if it exists | ||
AceObject landBlockObject = DatabaseManager.World.GetObjectsByLandblock(session.Player.Location.LandblockId.Landblock).Find(o => o.AceObjectId == objectId.Full); |
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.
I applaud the effort here. It's the best you could do with what you have. We really just need that action queue - stuff like this isn't going to fly in the long run.
Also worked out the log4net problems for debugging databases