feat: add quiver ammunition rules and negotiated state sync
This commit is contained in:
@@ -59,6 +59,7 @@ static DWORD clockms=1000;unsigned get_dword_time(){return clockms;}long long ge
|
||||
struct Character {
|
||||
unsigned m_portFeatureLastQuery=0;bool pc=true;std::vector<std::string> messages;std::map<unsigned,int> points;
|
||||
bool IsPC(){return pc;}void* GetDesc(){return this;}
|
||||
void PortEnableQuiverSync(){}
|
||||
int GetPoint(unsigned point){return points[point];}
|
||||
int GetHP(){return 123;}int GetMaxHP(){return 500;}int GetSP(){return 42;}int GetMaxSP(){return 100;}int GetLevel(){return 30;}
|
||||
void ChatPacket(int,const char* format,...) {
|
||||
@@ -118,7 +119,7 @@ int main(){
|
||||
assert(rewards[0].total==100 && rewards[0].rule==WIKI_SINGLE);
|
||||
rewards=items.PortWikiChest(50012);assert(rewards[1].rule==WIKI_INDEPENDENT && rewards[1].weight==150 && rewards[1].total==100);
|
||||
assert(items.PortWikiChest(50013).empty() && items.PortWikiChest(19).empty());
|
||||
Character ch;query(ch,"1 99 travel 2493 0");assert(travelBoss==2493);query(ch,"1 1 cap");assert(ch.messages.back()=="MTF1 cap 1 1 1983 1700000000");
|
||||
Character ch;query(ch,"1 99 travel 2493 0");assert(travelBoss==2493);query(ch,"1 1 cap");assert(ch.messages.back()=="MTF1 cap 1 1 4031 1700000000");
|
||||
query(ch,"1 90 rank 0 0");assert(rankQuery==0);
|
||||
query(ch,"1 91 rank 10 0");assert(ch.messages.back()=="MTF1 error 91 invalid" && rankQuery==0);
|
||||
query(ch,"1 92 rank 6 1");assert(ch.messages.back()=="MTF1 error 92 invalid" && rankQuery==0);
|
||||
|
||||
Reference in New Issue
Block a user