Commit 8af6db19 authored by argon.sun's avatar argon.sun

fix

parent e8edb598
......@@ -1996,7 +1996,6 @@ int DuelClient::ClientAnalyze(char* msg, unsigned int len) {
for (int i = 0; i < count; ++i) {
int code = BufferIO::ReadInt32(pbuf);
pcard = mainGame->dField.GetCard(player, LOCATION_DECK, mainGame->dField.deck[player].size() - 1 - i);
if(code)
pcard->SetCode(code);
}
for (int i = 0; i < count; ++i) {
......
......@@ -27,20 +27,20 @@ int main(int argc, char* argv[]) {
* -j: join host (host info from system.conf)
* -d: deck edit
* -r: replay */
else if(!strcmp(argv[1], "-j") or !strcmp(argv[1], "-d") or !strcmp(argv[1], "-r")){
else if(!strcmp(argv[1], "-j") or !strcmp(argv[1], "-d") or !strcmp(argv[1], "-r")) {
exit_on_return = true;
irr::SEvent event;
event.EventType = irr::EET_GUI_EVENT;
event.GUIEvent.EventType = irr::gui::EGET_BUTTON_CLICKED;
if(!strcmp(argv[1], "-j")){
if(!strcmp(argv[1], "-j")) {
event.GUIEvent.Caller = ygo::mainGame->btnLanMode;
ygo::mainGame->device->postEventFromUser(event);
event.GUIEvent.Caller = ygo::mainGame->btnJoinHost;
ygo::mainGame->device->postEventFromUser(event);
}else if(!strcmp(argv[1], "-d")){
} else if(!strcmp(argv[1], "-d")) {
event.GUIEvent.Caller = ygo::mainGame->btnDeckEdit;
ygo::mainGame->device->postEventFromUser(event);
}else if(!strcmp(argv[1], "-r")){
} else if(!strcmp(argv[1], "-r")) {
event.GUIEvent.Caller = ygo::mainGame->btnReplayMode;
ygo::mainGame->device->postEventFromUser(event);
ygo::mainGame->lstReplayList->setSelected(0);
......
......@@ -135,7 +135,12 @@ bool ReplayMode::ReplayAnalyze(char* msg, unsigned int len) {
mainGame->dInfo.curMsg = BufferIO::ReadUInt8(pbuf);
switch (mainGame->dInfo.curMsg) {
case MSG_RETRY: {
DuelClient::ClientAnalyze(offset, pbuf - offset);
mainGame->gMutex.Lock();
mainGame->stMessage->setText(L"Error occurs.");
mainGame->PopupElement(mainGame->wMessage);
mainGame->gMutex.Unlock();
mainGame->actionSignal.Reset();
mainGame->actionSignal.Wait();
return false;
}
case MSG_HINT: {
......
......@@ -897,7 +897,7 @@ int32 scriptlib::card_is_relate_to_battle(lua_State *L) {
check_param(L, PARAM_TYPE_CARD, 1);
card* pcard = *(card**) lua_touserdata(L, 1);
duel* pduel = pcard->pduel;
if(pcard->fieldid_r == pduel->game_field->core.pre_field[0] || pcard->fieldid == pduel->game_field->core.pre_field[1])
if(pcard->fieldid_r == pduel->game_field->core.pre_field[0] || pcard->fieldid_r == pduel->game_field->core.pre_field[1])
lua_pushboolean(L, 1);
else
lua_pushboolean(L, 0);
......
......@@ -2804,7 +2804,6 @@ int32 field::process_battle_command(uint16 step) {
reset_phase(PHASE_DAMAGE);
adjust_instant();
adjust_all();
core.units.begin()->step = 19;
return FALSE;
}
case 20: {
......
......@@ -29,7 +29,7 @@ end
function c10000040.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return true or Duel.CheckReleaseGroup(tp,c10000040.spfilter,1,nil,10000000)
return Duel.CheckReleaseGroup(tp,c10000040.spfilter,1,nil,10000000)
and Duel.CheckReleaseGroup(tp,c10000040.spfilter,1,nil,10000010)
and Duel.CheckReleaseGroup(tp,c10000040.spfilter,1,nil,10000020)
end
......
......@@ -16,7 +16,7 @@ function c1498130.tgcon(e,tp,eg,ep,ev,re,r,rp)
if not g or g:GetCount()~=1 then return false end
local tg=g:GetFirst()
local c=e:GetHandler()
if tg==c or tg:GetControler()~=tp or tg:IsFacedown() or or not tg:IsLocation(LOCATION_MZONE) or not tg:IsSetCard(0x3d) then return false end
if tg==c or tg:GetControler()~=tp or tg:IsFacedown() or not tg:IsLocation(LOCATION_MZONE) or not tg:IsSetCard(0x3d) then return false end
local tf=re:GetTarget()
return tf(re,rp,nil,nil,nil,nil,nil,nil,0,c)
end
......
......@@ -3,7 +3,7 @@
antialias = 2
nickname = Player
gamename = Game
lastdeck = chaosls
lastdeck = sixsamurai
textfont = c:/windows/fonts/simsun.ttc 14
numfont = c:/windows/fonts/arialbd.ttf
serverport = 7911
......
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