Skip to content

Commit

Permalink
fix(PC): typeof id
Browse files Browse the repository at this point in the history
  • Loading branch information
mystringEmpty committed Apr 8, 2024
1 parent aa14e6a commit ad2bcc1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@ jobs:
-name "GitHub"
-username "Dice-Developer-Team"
-password "${{ secrets.GITHUB_TOKEN }}"
- name: Automake
run: sudo apt-get install autoconf automake autoconf-archive

- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
Expand Down
2 changes: 1 addition & 1 deletion Dice/CharacterCard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ void Player::writeb(std::ofstream& fout) const {
for (const auto& [gid, pc] : mGroupCard)
{
fwrite(fout, gid);
fwrite(fout, unsigned short(pc ? pc->getID() : 0));
fwrite(fout, pc ? pc->getID() : (unsigned short)0);
}
}
else fwrite(fout, (short)0);
Expand Down
4 changes: 2 additions & 2 deletions Dice/CharacterCard.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ struct lua_State;
class CharaCard: public AnysTable
{
private:
const size_t id = 0;
const unsigned short id = 0;
string Name = "角色卡";
unordered_set<string> locks;
std::mutex cardMutex;
public:
size_t getID()const { return id; }
unsigned short getID()const { return id; }
MetaType getType()const override{ return MetaType::Actor; }
ptr<CardTemp> getTemplet()const;
bool locked(const string& key)const { return locks.count(key); }
Expand Down
2 changes: 1 addition & 1 deletion vcpkg
Submodule vcpkg updated 896 files

0 comments on commit ad2bcc1

Please sign in to comment.