project/Refactoring: Difference between revisions

From OpenKore Wiki
Jump to navigation Jump to search
(Created page with 'Possible improvements. Move everything what makes a sense to Actors, ActorLists and wrap $messageSender->sendEverything to Actor/ActorList/etc methods. = Globals.pm = == Chara…')
 
No edit summary
Line 1: Line 1:
Possible improvements.
Possible improvements.


Move everything what makes a sense to Actors, ActorLists and wrap $messageSender->sendEverything to Actor/ActorList/etc methods.
= Globals.pm =
 
Move everything what makes a sense to Actors, ActorLists and new modules and wrap $messageSender->sendEverything to Actor/ActorList/etc methods.
 
== Account-related ==
 
<pre>
@chars $char
$accountID $sessionID $sessionID2 $accountSex $accountSex2 ...
$net $messageSender $charServer $conState $captcha_state ...
@ai_seq @ai_seq_args %ai_v $AI $AI_forcedOff ...
 
other permanent (not cleaned on relog) or out of mapserver or general connection-related stuff
</pre>
=> new object $account->{...}
 
Next step:


= Globals.pm =
=> list of accounts? (multiple bots per OK instance)


== Character-related ==
== Character-related ==
Line 17: Line 33:
%cart (item list with cart info): ActorItemList $char->{cart}
%cart (item list with cart info): ActorItemList $char->{cart}
%storage, @storageID (storage item list with storage info): ActorItemList $char->{storage}
%storage, @storageID (storage item list with storage info): ActorItemList $char->{storage}
$hotkeyList: ???
$questList: ???
$mailList (list of mail messages): new object, mail message
@cardMergeItemsID, $cardMergeIndex: ActorItemList $char->{something}
@cardMergeItemsID, $cardMergeIndex: ActorItemList $char->{something}
@arrowCraftID (list of possible items to use on): ActorItemList $char->{something}
@arrowCraftID (list of possible items to use on): ActorItemList $char->{something}
Line 22: Line 42:
$repairList (list of possible items to use on): ActorItemList $char->{something}
$repairList (list of possible items to use on): ActorItemList $char->{something}
$cookingList: ActorItemList $char->{something}
$cookingList: ActorItemList $char->{something}
$hotkeyList: ???
  * these can also be just properties of inventory items
$questList: ???
 
$mailList (list of mail messages): new object, mail message
other character-binded temp. stuff and info: $char->{something}
</pre>
</pre>



Revision as of 02:35, 15 May 2010

Possible improvements.

Globals.pm

Move everything what makes a sense to Actors, ActorLists and new modules and wrap $messageSender->sendEverything to Actor/ActorList/etc methods.

Account-related

@chars $char
$accountID $sessionID $sessionID2 $accountSex $accountSex2 ...
$net $messageSender $charServer $conState $captcha_state ...
@ai_seq @ai_seq_args %ai_v $AI $AI_forcedOff ...

other permanent (not cleaned on relog) or out of mapserver or general connection-related stuff

=> new object $account->{...}

Next step:

=> list of accounts? (multiple bots per OK instance)

Character-related

%friends, @friendsID: ActorPlayerList $char->{friends}
$currentChatRoom: $char->{chatroom} link to chatroom in chatrooms list
@skillsID (list of character skills): $char->{skillsID} (already implemented for slaves; rename {slave_skillsID} to {skillsID}, too)
%guild (guild player list, ally/enemy guild list, guild info): ActorPlayerList $char->{guild}
%currentDeal (two item lists, info)
%shop, @articles, @venderListsID (our shop item list, shop info; another player's shop): ActorItemList $char->{shop}; ActorItemList $playerActor->{shop}

%cart (item list with cart info): ActorItemList $char->{cart}
%storage, @storageID (storage item list with storage info): ActorItemList $char->{storage}
$hotkeyList: ???
$questList: ???
$mailList (list of mail messages): new object, mail message

@cardMergeItemsID, $cardMergeIndex: ActorItemList $char->{something}
@arrowCraftID (list of possible items to use on): ActorItemList $char->{something}
@identifyID (list of possible items to use on): ActorItemList $char->{something}
$repairList (list of possible items to use on): ActorItemList $char->{something}
$cookingList: ActorItemList $char->{something}
  * these can also be just properties of inventory items

other character-binded temp. stuff and info: $char->{something}

Environment related

%targetTimeout (target×skill timeout): targetActor->{something}
%chatRooms, @chatRoomsID, @currentChatRoomUsers (list of chatrooms, list of players in current): new object: Chatroom, with ActorPlayerList inside
@storeList (npc store): ActorItemList $actorNpc->{store}
@cashList (list of items in npc cash store): ActorItemList $actorNpc->{something}
%spells, @spellsID
$auctionList (list of auction entries): ???
$devotionList (source×target): ActorPlayerList inside sourceActor