Merge pull request #16 from azerothcore/fix-build

chore: fix get guid function
This commit is contained in:
Stefano Borzì
2021-05-30 23:56:40 +02:00
committed by GitHub
2 changed files with 7 additions and 6 deletions

View File

@@ -8,8 +8,8 @@ jobs:
strategy:
fail-fast: false
matrix:
compiler: [clang6, clang9, clang10]
runs-on: ubuntu-20.04
compiler: [clang]
runs-on: ubuntu-latest
name: ${{ matrix.compiler }}
env:
COMPILER: ${{ matrix.compiler }}

View File

@@ -13,6 +13,7 @@ uint32 Max_roll;
class reward_system : public PlayerScript
{
public:
reward_system() : PlayerScript("reward_system") {}
@@ -76,7 +77,7 @@ public:
ChatHandler(receiver->GetSession()).PSendSysMessage("You will receive your item in your mailbox");
// format: name "subject text" "mail text" item1[:count1] item2[:count2] ... item12[:count12]
uint64 receiverGuid = receiver->GetGUID();
uint64 receiverGuid = receiver->GetGUID().GetCounter();
std::string receiverName;
std::string subject = "Reward System prize";
@@ -115,7 +116,7 @@ public:
}
// from console show not existed sender
MailSender sender(MAIL_NORMAL, receiver->GetSession() ? receiver->GetGUIDLow() : 0, MAIL_STATIONERY_TEST);
MailSender sender(MAIL_NORMAL, receiver->GetSession() ? receiver->GetGUID().GetCounter() : 0, MAIL_STATIONERY_TEST);
// fill mail
MailDraft draft(subject, text);
@@ -131,7 +132,7 @@ public:
}
}
draft.SendMailTo(trans, MailReceiver(receiver, GUID_LOPART(receiverGuid)), sender);
draft.SendMailTo(trans, MailReceiver(receiver, receiverGuid), sender);
CharacterDatabase.CommitTransaction(trans);
return;