Holds the caravan info.
More...
Detailed Description
Holds the caravan info.
Inherits ICaravan.
List of all members.
Public Member Functions |
| CCaravan (uint id, array< int >@ routes, array< int >@ rewards, int entire, int timeInTown, int townDlg, int wmDlg, int factionId, string name, CaravanManager@ mgr) |
void | SetBagsAndPids (uint townLeaderPid, uint townLeaderBag, uint leaderPid, uint leaderBag, array< uint >@ guardPids, array< uint >@ guardBags) |
void | LoadData () |
void | SetDefault () |
void | SaveData () |
void | SetId (uint id) |
| Sets the caravan id.
|
void | Init () |
| Initializes caravan.
|
void | ClearCaravan () |
void | SpawnCaravan () |
| Spawns caravan on current map, at the point marked by spawnpoint item.
|
void | PrepareDeparture (uint departTime) |
void | GetCurrentCoords (float& x, float& y) |
bool | EndOfTrack () |
void | IncRoutePosition () |
uint | GetLeaderId () |
| Caravan leader's id.
|
uint | GetWMLeaderId () |
bool | IsCaravanMember (Critter& crit) |
ICaravan@ | Route (uint16 origLoc, uint8 origMap, uint16 destLoc, uint8 destMap) |
| Sets origin/destination.
|
ICaravan@ | Route (uint16 x, uint16 y) |
| Adds coordinate to the caravan route.
|
ICaravan@ | _AddNpc (uint16 pid, uint dialogId, uint bagId, uint level) |
| Adds npc to caravan.
|
void | Assign (Critter& cr) |
| Assigns critter to caravan.
|
void | Leave (Critter& cr) |
| Remove critter from caravan.
|
uint | GetState () |
string | GetName () |
string | GetNextDestinationName () |
uint | GetActPay () |
uint | GetDepartTime () |
void | Start () |
| Starts the caravan route to the next target (destination, or way back to origin).
|
void | Reward () |
void | Arrive () |
void | PrepareRespawn () |
void | Respawn () |
Public Attributes |
uint | id |
CaravanManager@ | mgr |
array< uint > | players |
| Ids of the players that joined caravan.
|
array< uint > | critters |
| Ids of the npcs that run caravan (leader first).
|
array< CCaravanNpc > | npcs |
uint | wagon |
uint | routeIndex |
uint | routePosition |
uint | originStationId |
uint | destinationStationId |
uint16 | destLoc |
| Caravan destination's location pid.
|
uint8 | destMap |
| Map in destination location (index to the location maps list).
|
uint16 | origLoc |
| Origin location.
|
uint8 | origMap |
uint | currLoc |
| Current location.
|
uint8 | currMap |
uint | entire |
uint | timeInTown |
uint | timeEvent |
uint | departure |
uint | state |
int | target |
| Actual target (index to the routes table).
|
array< Coord > | route |
array< int >@ | routes |
array< int >@ | rewards |
string | name |
uint | townDlg |
uint | wmDlg |
uint | townLeaderPid |
uint | townLeaderBag |
uint | leaderPid |
uint | leaderBag |
uint | factionId |
array< uint >@ | guardPids |
array< uint >@ | guardBags |
Serializator | serializer |
Constructor & Destructor Documentation
CCaravan |
( |
uint |
id, |
|
|
array< int >@ |
routes, |
|
|
array< int >@ |
rewards, |
|
|
int |
entire, |
|
|
int |
timeInTown, |
|
|
int |
townDlg, |
|
|
int |
wmDlg, |
|
|
int |
factionId, |
|
|
string |
name, |
|
|
CaravanManager@ |
mgr | |
|
) |
| | |
Member Function Documentation
void SetBagsAndPids |
( |
uint |
townLeaderPid, |
|
|
uint |
townLeaderBag, |
|
|
uint |
leaderPid, |
|
|
uint |
leaderBag, |
|
|
array< uint >@ |
guardPids, |
|
|
array< uint >@ |
guardBags | |
|
) |
| | |
Initializes caravan.
Implements ICaravan.
Spawns caravan on current map, at the point marked by spawnpoint item.
void PrepareDeparture |
( |
uint |
departTime |
) |
|
void GetCurrentCoords |
( |
float& |
x, |
|
|
float& |
y | |
|
) |
| | |
void IncRoutePosition |
( |
|
) |
|
Caravan leader's id.
Implements ICaravan.
bool IsCaravanMember |
( |
Critter& |
crit |
) |
|
ICaravan@ Route |
( |
uint16 |
origLoc, |
|
|
uint8 |
origMap, |
|
|
uint16 |
destLoc, |
|
|
uint8 |
destMap | |
|
) |
| | |
Sets origin/destination.
Implements ICaravan.
Adds coordinate to the caravan route.
First and last are not needed, as they're taken from origin/destination locations.
Implements ICaravan.
ICaravan@ _AddNpc |
( |
uint16 |
pid, |
|
|
uint |
dialogId, |
|
|
uint |
bagId, |
|
|
uint |
level | |
|
) |
| | |
Adds npc to caravan.
Implements ICaravan.
Assigns critter to caravan.
Implements ICaravan.
Remove critter from caravan.
Implements ICaravan.
string GetNextDestinationName |
( |
|
) |
|
Starts the caravan route to the next target (destination, or way back to origin).
Implements ICaravan.
Member Data Documentation
Ids of the players that joined caravan.
Ids of the npcs that run caravan (leader first).
Caravan destination's location pid.
Map in destination location (index to the location maps list).
Current location.
Either origin or destination, or 0 (worldmap).
Actual target (index to the routes table).