j’aime ma famille
- Joined
- Aug 24, 2012
- Messages
- 604
- Reaction score
- 304
Nice project both of u (any new progress?)
Was wondering wouldnt you be able to use the avatar class like this ?
Code:[COLOR=#cc7832][B]public function [/B][/COLOR][COLOR=#ffc66d]avatar[/COLOR]() { [COLOR=#cc7832][B]return [/B][/COLOR][COLOR=#9876aa]$this[/COLOR]->[COLOR=#ffc66d]hasOne[/COLOR](Avatar::[COLOR=#9876aa][I]class[/I][/COLOR][COLOR=#cc7832], [/COLOR][COLOR=#6a8759]'player_id'[/COLOR][COLOR=#cc7832], [/COLOR][COLOR=#6a8759]'id'[/COLOR])->[COLOR=#ffc66d]whereCurrent[/COLOR]([COLOR=#6a8759]'1'[/COLOR])[COLOR=#cc7832]; [/COLOR]} [COLOR=#cc7832][B]public function [/B][/COLOR][COLOR=#ffc66d]avatars[/COLOR]() { [COLOR=#cc7832][B]return [/B][/COLOR][COLOR=#9876aa]$this[/COLOR]->[COLOR=#ffc66d]hasMany[/COLOR](Avatar::[COLOR=#9876aa][I]class[/I][/COLOR][COLOR=#cc7832], [/COLOR][COLOR=#6a8759]'player_id'[/COLOR][COLOR=#cc7832], [/COLOR][COLOR=#6a8759]'id'[/COLOR])[COLOR=#cc7832]; [/COLOR]}
public class UpdateNavigatorSettingsMessageEvent : IPacketEvent
{
public void Run(Client client, MessageEvent msgEvent)
{
var homeRoom = msgEvent.ReadVL64();
if (homeRoom != 0)
{
if (Engine.Locator.RoomController.GetRoom(homeRoom) == null) return;
}
client.Player.HomeRoom = homeRoom;
Engine.Locator.PlayerController.Dao.UpdateHomeRoom(client.Player.Id, homeRoom);
client.SendComposer(new NavigatorSettingsComposer(homeRoom));
}
}
if (!int.TryParse(item.Data, out int currentState) || currentState < 0)
{
nextState = 1;
}
else if (currentState >= item.Definition.MaxInteractionState)
{
nextState = 0;
}
else
{
nextState = currentState + 1;
}
Why not generate the item.Data on purchase?After months I finally did something. I had some private stuff going on and I felt kind of unmotivated. Also the source is pretty messy and couldn't be bothered to rewrite it. Nonetheless, I started working on it again. Did some small fixes and did one small feature. I'm going to work more on it from now on.
Fixes:
- When a new item was bought, for example a TV, you would have to double click TWICE to turn it on.
What caused the bug:
In my code I checked whether "item.Data" was an int. If not, set the NEXT state to 0. In other words, item.Data is empty when you purchase a furni, so double clicking it would make the data 0, which is ALSO off. Setting it to 1 fixed it.
- Item data is saved in database now
Also made home rooms, you can now change your home room, and when you set a room as home room, you'll automatically go to that room. Taking the home room off will make you go to the hotel view instead.
PHP:public class UpdateNavigatorSettingsMessageEvent : IPacketEvent { public void Run(Client client, MessageEvent msgEvent) { var homeRoom = msgEvent.ReadVL64(); if (homeRoom != 0) { if (Engine.Locator.RoomController.GetRoom(homeRoom) == null) return; } client.Player.HomeRoom = homeRoom; Engine.Locator.PlayerController.Dao.UpdateHomeRoom(client.Player.Id, homeRoom); client.SendComposer(new NavigatorSettingsComposer(homeRoom)); } }
The fixed code for interactions:
PHP:if (!int.TryParse(item.Data, out int currentState) || currentState < 0) { nextState = 1; } else if (currentState >= item.Definition.MaxInteractionState) { nextState = 0; } else { nextState = currentState + 1; }
Why not generate the item.Data on purchase?
While I don't like to talk much about it, Aurora V9 will be standalone, and will work on Sqlite instead of MySQL and will be written in Dart.
[Besides that, @spreedblood and I will be working on a secret project - maybe something revolutionary. It's unknown whether we'll finish it - but details might be given out when we've started.
Good choice.
I really like emulators that I can just open up and it's immediately ready to use.
You had my curiosity, now you have my attention.:
It's a shame what's happening to Aurora, but I agree, the source is hard to maintain, it's not necessarily "bad" code, but there's too much overkill that makes it hard to add features, especially with all that dependency injection which IMO is too much for a Habbo server.
It's just Horus with extra features.Good choice.
I really like emulators that I can just open up and it's immediately ready to use.
You had my curiosity, now you have my attention.:
It's a shame what's happening to Aurora, but I agree, the source is hard to maintain, it's not necessarily "bad" code, but there's too much overkill that makes it hard to add features, especially with all that dependency injection which IMO is too much for a Habbo server.
It's just Horus with extra features.
So did you choose v7 or v9 ? Still missing packets? i might be able to deliver those.
Or for what ever reason v10-v11.
setlocal 5
dup
getlex QName(PackageNamespace("flash.external"), "ExternalInterface")
pushstring "console.log"
getlocal 5
getproperty QName(PackageNamespace(""), "type")
callpropvoid QName(PackageNamespace(""), "call"), 2
public function _SafeStr_2607(_arg_1:_SafeStr_2333, _arg_2:Boolean=true):void{
var _local_5:_SafeStr_2333;
var _local_3:Boolean;
var _local_4:int;
while (_local_4 < _SafeStr_2598.length)
{
_local_5 = (_SafeStr_2598[_local_4] as _SafeStr_2333);
ExternalInterface.call("console.log", _local_5.type);
if ((((_local_5.type == _arg_1.type)) && ((_local_5.level < _arg_1.level))))
{
_local_5.level = _arg_1.level;
_local_5._SafeStr_2608 = _arg_1._SafeStr_2608;
_local_5.image = _SafeStr_2600._SafeStr_2609(_arg_1._SafeStr_2608);
_local_3 = true;
};
_local_4++;
};
if (!_local_3)
{
_arg_1.image = _SafeStr_2600._SafeStr_2609(_arg_1._SafeStr_2608);
_SafeStr_2598.push(_arg_1);
};
if (_arg_2)
{
_SafeStr_2610();
};
}
import flash.external.ExternalInterface;
public function _SafeStr_2607(_arg_1:_SafeStr_2333, _arg_2:Boolean=true):void{
var _local_5:_SafeStr_2333;
var _local_3:Boolean;
var _local_4:int;
while (_local_4 < _SafeStr_2598.length)
{
_local_5 = (_SafeStr_2598[_local_4] as _SafeStr_2333);
if ((((_local_5.type == _arg_1.type)) && ((_local_5.level < _arg_1.level))))
{
_local_5.level = _arg_1.level;
_local_5._SafeStr_2608 = _arg_1._SafeStr_2608;
_local_5.image = _SafeStr_2600._SafeStr_2609(_arg_1._SafeStr_2608);
_local_3 = true;
};
_local_4++;
};
if (!_local_3)
{
_arg_1.image = _SafeStr_2600._SafeStr_2609(_arg_1._SafeStr_2608);
_SafeStr_2598.push(_arg_1);
};
if (_arg_2)
{
_SafeStr_2610();
};
}
if ((((_local_5.type == _arg_1.type)) && ((_local_5.level < _arg_1.level))))
if (!_local_3)
{
_arg_1.image = _SafeStr_2600._SafeStr_2609(_arg_1._SafeStr_2608);
_SafeStr_2598.push(_arg_1);
};
I saw you also started some R63 emulator?
I'm not a fan of your index. Maybe you should re-design it a bit more than that.Current progress: