Commit 18731768 authored by DailyShana's avatar DailyShana Committed by nanahira

update loading special script (#8)

* Update single_duel.cpp

* Update tag_duel.cpp

* Update replay_mode.cpp

* Update single_duel.cpp

* Update tag_duel.cpp

* Update replay_mode.cpp
parent f9881f11
......@@ -156,6 +156,9 @@ bool ReplayMode::StartDuel() {
cur_replay.ReadName(mainGame->dInfo.clientname);
}
pduel = create_duel(rnd.rand());
#ifdef YGOPRO_SERVER_MODE
preload_script(pduel, "./script/special.lua", 0);
#endif
int start_lp = cur_replay.ReadInt32();
int start_hand = cur_replay.ReadInt32();
int draw_count = cur_replay.ReadInt32();
......
......@@ -532,6 +532,9 @@ void SingleDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
set_message_handler((message_handler)SingleDuel::MessageHandler);
rnd.reset(seed);
pduel = create_duel(rnd.rand());
#ifdef YGOPRO_SERVER_MODE
preload_script(pduel, "./script/special.lua", 0);
#endif
set_player_info(pduel, 0, host_info.start_lp, host_info.start_hand, host_info.draw_count);
set_player_info(pduel, 1, host_info.start_lp, host_info.start_hand, host_info.draw_count);
int opt = (int)host_info.duel_rule << 16;
......
......@@ -509,6 +509,9 @@ void TagDuel::TPResult(DuelPlayer* dp, unsigned char tp) {
set_message_handler((message_handler)TagDuel::MessageHandler);
rnd.reset(seed);
pduel = create_duel(rnd.rand());
#ifdef YGOPRO_SERVER_MODE
preload_script(pduel, "./script/special.lua", 0);
#endif
set_player_info(pduel, 0, host_info.start_lp, host_info.start_hand, host_info.draw_count);
set_player_info(pduel, 1, host_info.start_lp, host_info.start_hand, host_info.draw_count);
int opt = (int)host_info.duel_rule << 16;
......
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