mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 23:01:30 +00:00
Add completion emote for tasks
This commit is contained in:
parent
22f586f110
commit
dfa7e2bffb
@ -30,7 +30,7 @@
|
|||||||
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CURRENT_BINARY_DATABASE_VERSION 9124
|
#define CURRENT_BINARY_DATABASE_VERSION 9125
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9019
|
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9019
|
||||||
#else
|
#else
|
||||||
|
|||||||
@ -378,6 +378,7 @@
|
|||||||
9122|2018_03_07_ucs_command.sql|SELECT * FROM `command_settings` WHERE `command` LIKE 'ucs'|empty|
|
9122|2018_03_07_ucs_command.sql|SELECT * FROM `command_settings` WHERE `command` LIKE 'ucs'|empty|
|
||||||
9123|2018_07_07_data_buckets.sql|SHOW TABLES LIKE 'data_buckets'|empty|
|
9123|2018_07_07_data_buckets.sql|SHOW TABLES LIKE 'data_buckets'|empty|
|
||||||
9124|2018_07_09_tasks.sql|SHOW COLUMNS FROM `tasks` LIKE 'type'|empty|
|
9124|2018_07_09_tasks.sql|SHOW COLUMNS FROM `tasks` LIKE 'type'|empty|
|
||||||
|
9125|2018_07_20_task_emote.sql|SHOW COLUMNS FROM `tasks` LIKE 'completion_emote'|empty|
|
||||||
|
|
||||||
# Upgrade conditions:
|
# Upgrade conditions:
|
||||||
# This won't be needed after this system is implemented, but it is used database that are not
|
# This won't be needed after this system is implemented, but it is used database that are not
|
||||||
|
|||||||
1
utils/sql/git/required/2018_07_20_task_emote.sql
Normal file
1
utils/sql/git/required/2018_07_20_task_emote.sql
Normal file
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `tasks` ADD `completion_emote` VARCHAR(128) NOT NULL DEFAULT '';
|
||||||
@ -118,12 +118,12 @@ bool TaskManager::LoadTasks(int singleTask)
|
|||||||
|
|
||||||
query = StringFormat("SELECT `id`, `type`, `duration`, `duration_code`, `title`, `description`, "
|
query = StringFormat("SELECT `id`, `type`, `duration`, `duration_code`, `title`, `description`, "
|
||||||
"`reward`, `rewardid`, `cashreward`, `xpreward`, `rewardmethod`, `faction_reward`,"
|
"`reward`, `rewardid`, `cashreward`, `xpreward`, `rewardmethod`, `faction_reward`,"
|
||||||
"`minlevel`, `maxlevel`, `repeatable` FROM `tasks` WHERE `id` < %i",
|
"`minlevel`, `maxlevel`, `repeatable`, `completion_emote` FROM `tasks` WHERE `id` < %i",
|
||||||
MAXTASKS);
|
MAXTASKS);
|
||||||
} else
|
} else
|
||||||
query = StringFormat("SELECT `id`, `type`, `duration`, `duration_code`, `title`, `description`, "
|
query = StringFormat("SELECT `id`, `type`, `duration`, `duration_code`, `title`, `description`, "
|
||||||
"`reward`, `rewardid`, `cashreward`, `xpreward`, `rewardmethod`, `faction_reward`,"
|
"`reward`, `rewardid`, `cashreward`, `xpreward`, `rewardmethod`, `faction_reward`,"
|
||||||
"`minlevel`, `maxlevel`, `repeatable` FROM `tasks` WHERE `id` = %i",
|
"`minlevel`, `maxlevel`, `repeatable`, `completion_emote` FROM `tasks` WHERE `id` = %i",
|
||||||
singleTask);
|
singleTask);
|
||||||
|
|
||||||
const char *ERR_MYSQLERROR = "[TASKS]Error in TaskManager::LoadTasks: %s";
|
const char *ERR_MYSQLERROR = "[TASKS]Error in TaskManager::LoadTasks: %s";
|
||||||
@ -159,6 +159,7 @@ bool TaskManager::LoadTasks(int singleTask)
|
|||||||
Tasks[taskID]->MinLevel = atoi(row[12]);
|
Tasks[taskID]->MinLevel = atoi(row[12]);
|
||||||
Tasks[taskID]->MaxLevel = atoi(row[13]);
|
Tasks[taskID]->MaxLevel = atoi(row[13]);
|
||||||
Tasks[taskID]->Repeatable = atoi(row[14]);
|
Tasks[taskID]->Repeatable = atoi(row[14]);
|
||||||
|
Tasks[taskID]->completion_emote = row[15];
|
||||||
Tasks[taskID]->ActivityCount = 0;
|
Tasks[taskID]->ActivityCount = 0;
|
||||||
Tasks[taskID]->SequenceMode = ActivitiesSequential;
|
Tasks[taskID]->SequenceMode = ActivitiesSequential;
|
||||||
Tasks[taskID]->LastStep = 0;
|
Tasks[taskID]->LastStep = 0;
|
||||||
@ -2020,6 +2021,9 @@ void ClientTaskState::RewardTask(Client *c, TaskInformation *Task) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Task->completion_emote.empty())
|
||||||
|
c->SendColoredText(CC_Yellow, Task->completion_emote); // unsure if they use this packet or color, should work
|
||||||
|
|
||||||
// just use normal NPC faction ID stuff
|
// just use normal NPC faction ID stuff
|
||||||
if (Task->faction_reward)
|
if (Task->faction_reward)
|
||||||
c->SetFactionLevel(c->CharacterID(), Task->faction_reward, c->GetBaseClass(), c->GetBaseRace(), c->GetDeity());
|
c->SetFactionLevel(c->CharacterID(), Task->faction_reward, c->GetBaseClass(), c->GetBaseRace(), c->GetDeity());
|
||||||
|
|||||||
@ -142,6 +142,7 @@ struct TaskInformation {
|
|||||||
std::string Description; // max length 4000, 2048 on Tit
|
std::string Description; // max length 4000, 2048 on Tit
|
||||||
std::string Reward;
|
std::string Reward;
|
||||||
std::string item_link; // max length 128 older clients, item link gets own string
|
std::string item_link; // max length 128 older clients, item link gets own string
|
||||||
|
std::string completion_emote; // emote after completing task, yellow. Maybe should make more generic ... but yellow for now!
|
||||||
int RewardID;
|
int RewardID;
|
||||||
int CashReward; // Expressed in copper
|
int CashReward; // Expressed in copper
|
||||||
int XPReward;
|
int XPReward;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user