Commit 6701931a authored by Argon.Sun's avatar Argon.Sun

update

parent fa24c16c
...@@ -1252,9 +1252,7 @@ void card::remove_effect(effect* peffect, effect_container::iterator it) { ...@@ -1252,9 +1252,7 @@ void card::remove_effect(effect* peffect, effect_container::iterator it) {
if(cmit != counters.end()) { if(cmit != counters.end()) {
pduel->write_buffer8(MSG_REMOVE_COUNTER); pduel->write_buffer8(MSG_REMOVE_COUNTER);
pduel->write_buffer16(cmit->first); pduel->write_buffer16(cmit->first);
pduel->write_buffer8(current.controler); pduel->write_buffer32(get_info_location());
pduel->write_buffer8(current.location);
pduel->write_buffer8(current.sequence);
pduel->write_buffer8(cmit->second); pduel->write_buffer8(cmit->second);
counters.erase(cmit); counters.erase(cmit);
} }
...@@ -1352,9 +1350,7 @@ void card::reset(uint32 id, uint32 reset_type) { ...@@ -1352,9 +1350,7 @@ void card::reset(uint32 id, uint32 reset_type) {
if(rm->first & COUNTER_NEED_ENABLE) { if(rm->first & COUNTER_NEED_ENABLE) {
pduel->write_buffer8(MSG_REMOVE_COUNTER); pduel->write_buffer8(MSG_REMOVE_COUNTER);
pduel->write_buffer16(rm->first); pduel->write_buffer16(rm->first);
pduel->write_buffer8(current.controler); pduel->write_buffer32(get_info_location());
pduel->write_buffer8(current.location);
pduel->write_buffer8(current.sequence);
pduel->write_buffer8(rm->second); pduel->write_buffer8(rm->second);
counters.erase(rm); counters.erase(rm);
} }
...@@ -1500,9 +1496,7 @@ int32 card::add_counter(uint8 playerid, uint16 countertype, uint16 count) { ...@@ -1500,9 +1496,7 @@ int32 card::add_counter(uint8 playerid, uint16 countertype, uint16 count) {
counters[countertype] += count; counters[countertype] += count;
pduel->write_buffer8(MSG_ADD_COUNTER); pduel->write_buffer8(MSG_ADD_COUNTER);
pduel->write_buffer16(countertype); pduel->write_buffer16(countertype);
pduel->write_buffer8(current.controler); pduel->write_buffer32(get_info_location());
pduel->write_buffer8(current.location);
pduel->write_buffer8(current.sequence);
pduel->write_buffer8(count); pduel->write_buffer8(count);
return TRUE; return TRUE;
} }
...@@ -1515,9 +1509,7 @@ int32 card::remove_counter(uint16 countertype, uint16 count) { ...@@ -1515,9 +1509,7 @@ int32 card::remove_counter(uint16 countertype, uint16 count) {
else cmit->second -= count; else cmit->second -= count;
pduel->write_buffer8(MSG_REMOVE_COUNTER); pduel->write_buffer8(MSG_REMOVE_COUNTER);
pduel->write_buffer16(countertype); pduel->write_buffer16(countertype);
pduel->write_buffer8(current.controler); pduel->write_buffer32(get_info_location());
pduel->write_buffer8(current.location);
pduel->write_buffer8(current.sequence);
pduel->write_buffer8(count); pduel->write_buffer8(count);
return TRUE; return TRUE;
} }
......
...@@ -286,8 +286,8 @@ struct card_data { ...@@ -286,8 +286,8 @@ struct card_data {
#define MSG_DRAW 90 #define MSG_DRAW 90
#define MSG_DAMAGE 91 #define MSG_DAMAGE 91
#define MSG_RECOVER 92 #define MSG_RECOVER 92
#define MSG_EQUIP 93 #define MSG_LPUPDATE 93
#define MSG_LPUPDATE 94 #define MSG_EQUIP 94
#define MSG_UNEQUIP 95 #define MSG_UNEQUIP 95
#define MSG_CARD_TARGET 96 #define MSG_CARD_TARGET 96
#define MSG_CANCEL_TARGET 97 #define MSG_CANCEL_TARGET 97
......
...@@ -539,7 +539,6 @@ void field::shuffle(uint8 playerid, uint8 location) { ...@@ -539,7 +539,6 @@ void field::shuffle(uint8 playerid, uint8 location) {
if(location == LOCATION_HAND) { if(location == LOCATION_HAND) {
pduel->write_buffer8(MSG_SHUFFLE_HAND); pduel->write_buffer8(MSG_SHUFFLE_HAND);
pduel->write_buffer8(playerid); pduel->write_buffer8(playerid);
pduel->write_buffer8(player[playerid].list_hand.size());
for(auto& cit : svector) for(auto& cit : svector)
pduel->write_buffer32(cit->data.code); pduel->write_buffer32(cit->data.code);
core.shuffle_hand_check[playerid] = FALSE; core.shuffle_hand_check[playerid] = FALSE;
......
...@@ -1768,9 +1768,7 @@ int32 scriptlib::card_remove_counter(lua_State *L) { ...@@ -1768,9 +1768,7 @@ int32 scriptlib::card_remove_counter(lua_State *L) {
for(auto cmit = pcard->counters.begin(); cmit != pcard->counters.end(); ++cmit) { for(auto cmit = pcard->counters.begin(); cmit != pcard->counters.end(); ++cmit) {
pcard->pduel->write_buffer8(MSG_REMOVE_COUNTER); pcard->pduel->write_buffer8(MSG_REMOVE_COUNTER);
pcard->pduel->write_buffer16(cmit->first); pcard->pduel->write_buffer16(cmit->first);
pcard->pduel->write_buffer8(pcard->current.controler); pcard->pduel->write_buffer32(pcard->get_info_location());
pcard->pduel->write_buffer8(pcard->current.location);
pcard->pduel->write_buffer8(pcard->current.sequence);
pcard->pduel->write_buffer8(cmit->second); pcard->pduel->write_buffer8(cmit->second);
} }
pcard->counters.clear(); pcard->counters.clear();
......
...@@ -871,7 +871,6 @@ int32 field::process() { ...@@ -871,7 +871,6 @@ int32 field::process() {
} }
pduel->lua->add_param(newgroup, PARAM_TYPE_GROUP); pduel->lua->add_param(newgroup, PARAM_TYPE_GROUP);
pduel->write_buffer8(MSG_RANDOM_SELECTED); pduel->write_buffer8(MSG_RANDOM_SELECTED);
pduel->write_buffer8(it->arg1);
pduel->write_buffer8(count); pduel->write_buffer8(count);
for(auto& pcard : newgroup->container) for(auto& pcard : newgroup->container)
pduel->write_buffer32(pcard->get_info_location()); pduel->write_buffer32(pcard->get_info_location());
...@@ -4254,8 +4253,8 @@ int32 field::add_chain(uint16 step) { ...@@ -4254,8 +4253,8 @@ int32 field::add_chain(uint16 step) {
pduel->write_buffer8(clit.triggering_controler); pduel->write_buffer8(clit.triggering_controler);
pduel->write_buffer8(clit.triggering_location); pduel->write_buffer8(clit.triggering_location);
pduel->write_buffer8(clit.triggering_sequence); pduel->write_buffer8(clit.triggering_sequence);
pduel->write_buffer8(0);
pduel->write_buffer32(peffect->description); pduel->write_buffer32(peffect->description);
pduel->write_buffer8(core.current_chain.size() + 1);
break_effect(); break_effect();
if(core.chain_limit) { if(core.chain_limit) {
luaL_unref(pduel->lua->lua_state, LUA_REGISTRYINDEX, core.chain_limit); luaL_unref(pduel->lua->lua_state, LUA_REGISTRYINDEX, core.chain_limit);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment