FOnline Development > General Discussion

FOnlineServer with Mono

<< < (7/11) > >>

Bartosz:
How does this interface look like? Maybe by looking at methods signatures I could think of something/have better knowledge about those requirements.

wladimiiir:
This is the current interface of Action in AngelScript (but it is not in its final state):

--- Code: ---interface Action
{
Action@ GetSuperAction();
void SetSuperAction(Action@ action);
Action@ AddSubAction(Action@ action);
Action@[] GetSubActions();
void CollectListeningActions(Action@[]& collection);
Action@ And(Action@ andAction);
Action@ If(Condition@ condition);
Action@ IfNot(Condition@ condition);
void PerformAndAction(Critter& critter, Critter@ otherCritter, Item@ item);
bool Check(Critter& critter, Critter@ otherCritter, Item@ item);


bool IsRunning();
void SetRunning(bool running);
bool IsListening();
void SetListening(bool listening);

bool Start(Critter& critter);
void Perform(Critter& critter);
void Finish(Critter& critter);
void Cancel(Critter& critter);
void StartNextAction(Critter& critter);

string GetInfo();

void IdleEvent(Critter& critter);
void ShowCritterEvent(Critter& critter, Critter& showCritter);
void HideCritterEvent(Critter& critter, Critter& hideCritter);
bool AttackEvent(Critter& critter, Critter& target);
bool AttackedEvent(Critter& critter, Critter& attacker);
void DeadEvent(Critter& critter, Critter@ killer);
void MessageEvent(Critter& critter, Critter& messenger, int message, int value);
void SeeSomeoneAttackEvent(Critter& critter, Critter& attacker, Critter& attacked);
void SeeSomeoneDeadEvent(Critter& critter, Critter& killed, Critter@ killer);
void SeeSomeoneAttackedEvent(Critter& critter, Critter& attacked, Critter& attacker);
void SeeSomeoneStealingEvent(Critter& critter, Critter& victim, Critter& thief, bool success, Item& item, uint count);
void SeeSomeoneUseSkill(Critter& critter, Critter& skillCritter, int skill, Critter@ onCritter, Item@ onItem, Scenery@ onScenery);
int PlaneBeginEvent(Critter& critter, NpcPlane& plane, int reason, Critter@ someCr, Item@ someItem);
int PlaneRunEvent(Critter& critter, NpcPlane& plane, int reason, uint& result0, uint& result1, uint& result2);
int PlaneEndEvent(Critter& critter, NpcPlane& plane, int reason, Critter@ someCr, Item@ someItem);
}
--- End code ---

And Manager has void Start(Critter& critter, Action& action) function, which starts the action for specified critter.

wladimiiir:
I am scared to ask, but what "Virtual events did nothing good" means?

Bartosz:
It means I've screwed commit message (commiting from git to svn is tricky).

This commit also involved some project structure refactoring, and it should be described in message instead). Scrapping virtual modifier from events was just minor part of refactor.

wladimiiir:
I have problem running Mono server after the latest changes. I tried it on clean version of SDK, rebuild the Mono solution in MonoDevelop, but executing FOnlineServer.exe and pressing Start server will crash the server without dump file created, so I am not sure why it is happening. Did I forget to do something or there might be a bug introduced?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version