Merge pull request #40 from Cerapter/mega-merge-case-announcer
Made case announcement use netcode instead of calling tsuserver commands.
This commit is contained in:
commit
8be6944475
@ -19,7 +19,7 @@ AOCaseAnnouncerDialog::AOCaseAnnouncerDialog(QWidget *parent, AOApplication *p_a
|
|||||||
ui_announcer_buttons->setOrientation(Qt::Horizontal);
|
ui_announcer_buttons->setOrientation(Qt::Horizontal);
|
||||||
ui_announcer_buttons->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
ui_announcer_buttons->setStandardButtons(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||||
|
|
||||||
QObject::connect(ui_announcer_buttons, SIGNAL(accepted()), this, SLOT(on_ok_pressed()));
|
QObject::connect(ui_announcer_buttons, SIGNAL(accepted()), this, SLOT(ok_pressed()));
|
||||||
QObject::connect(ui_announcer_buttons, SIGNAL(rejected()), this, SLOT(cancel_pressed()));
|
QObject::connect(ui_announcer_buttons, SIGNAL(rejected()), this, SLOT(cancel_pressed()));
|
||||||
|
|
||||||
setUpdatesEnabled(false);
|
setUpdatesEnabled(false);
|
||||||
|
@ -3438,31 +3438,39 @@ void Courtroom::on_casing_clicked()
|
|||||||
if (ao_app->casing_alerts_enabled)
|
if (ao_app->casing_alerts_enabled)
|
||||||
{
|
{
|
||||||
if (ui_casing->isChecked())
|
if (ui_casing->isChecked())
|
||||||
ao_app->send_server_packet(new AOPacket("CT#" + ui_ooc_chat_name->text() + "#/setcase"
|
{
|
||||||
+ " \"" + ao_app->get_casing_can_host_cases() + "\""
|
QStringList f_packet;
|
||||||
+ " " + QString::number(ao_app->get_casing_cm_enabled())
|
|
||||||
+ " " + QString::number(ao_app->get_casing_defence_enabled())
|
f_packet.append(ao_app->get_casing_can_host_cases());
|
||||||
+ " " + QString::number(ao_app->get_casing_prosecution_enabled())
|
f_packet.append(QString::number(ao_app->get_casing_cm_enabled()));
|
||||||
+ " " + QString::number(ao_app->get_casing_judge_enabled())
|
f_packet.append(QString::number(ao_app->get_casing_defence_enabled()));
|
||||||
+ " " + QString::number(ao_app->get_casing_juror_enabled())
|
f_packet.append(QString::number(ao_app->get_casing_prosecution_enabled()));
|
||||||
+ " " + QString::number(ao_app->get_casing_steno_enabled())
|
f_packet.append(QString::number(ao_app->get_casing_judge_enabled()));
|
||||||
+ "#%"));
|
f_packet.append(QString::number(ao_app->get_casing_juror_enabled()));
|
||||||
|
f_packet.append(QString::number(ao_app->get_casing_steno_enabled()));
|
||||||
|
|
||||||
|
ao_app->send_server_packet(new AOPacket("SETCASE", f_packet));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
ao_app->send_server_packet(new AOPacket("CT#" + ui_ooc_chat_name->text() + "#/setcase \"\" 0 0 0 0 0 0#%"));
|
ao_app->send_server_packet(new AOPacket("SETCASE#\"\"#0#0#0#0#0#0#%"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Courtroom::announce_case(QString title, bool def, bool pro, bool jud, bool jur, bool steno)
|
void Courtroom::announce_case(QString title, bool def, bool pro, bool jud, bool jur, bool steno)
|
||||||
{
|
{
|
||||||
if (ao_app->casing_alerts_enabled)
|
if (ao_app->casing_alerts_enabled)
|
||||||
ao_app->send_server_packet(new AOPacket("CT#" + ui_ooc_chat_name->text() + "#/anncase \""
|
{
|
||||||
+ title + "\" "
|
QStringList f_packet;
|
||||||
+ QString::number(def) + " "
|
|
||||||
+ QString::number(pro) + " "
|
f_packet.append(title);
|
||||||
+ QString::number(jud) + " "
|
f_packet.append(QString::number(def));
|
||||||
+ QString::number(jur) + " "
|
f_packet.append(QString::number(pro));
|
||||||
+ QString::number(steno)
|
f_packet.append(QString::number(jud));
|
||||||
+ "#%"));
|
f_packet.append(QString::number(jur));
|
||||||
|
f_packet.append(QString::number(steno));
|
||||||
|
|
||||||
|
ao_app->send_server_packet(new AOPacket("CASEA", f_packet));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Courtroom::~Courtroom()
|
Courtroom::~Courtroom()
|
||||||
|
Loading…
Reference in New Issue
Block a user