mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[Bug Fix] Fix AddCrystals() in Perl/Lua (#4445)
This commit is contained in:
parent
6296ed6d41
commit
f475cecdb1
@ -1214,25 +1214,23 @@ void Lua_Client::AddPVPPoints(uint32 points) {
|
||||
self->AddPVPPoints(points);
|
||||
}
|
||||
|
||||
void Lua_Client::AddCrystals(uint32 radiant, uint32 ebon) {
|
||||
void Lua_Client::AddCrystals(uint32 radiant_count, uint32 ebon_count) {
|
||||
Lua_Safe_Call_Void();
|
||||
|
||||
if (ebon != 0) {
|
||||
if (ebon > 0) {
|
||||
self->AddEbonCrystals(ebon);
|
||||
return;
|
||||
if (ebon_count != 0) {
|
||||
if (ebon_count > 0) {
|
||||
self->AddEbonCrystals(ebon_count);
|
||||
} else {
|
||||
self->RemoveEbonCrystals(ebon_count);
|
||||
}
|
||||
|
||||
self->RemoveEbonCrystals(ebon);
|
||||
}
|
||||
|
||||
if (radiant != 0) {
|
||||
if (radiant > 0) {
|
||||
self->AddRadiantCrystals(radiant);
|
||||
return;
|
||||
if (radiant_count != 0) {
|
||||
if (radiant_count > 0) {
|
||||
self->AddRadiantCrystals(radiant_count);
|
||||
} else {
|
||||
self->RemoveRadiantCrystals(radiant_count);
|
||||
}
|
||||
|
||||
self->RemoveRadiantCrystals(radiant);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -316,7 +316,7 @@ public:
|
||||
void KeyRingAdd(uint32 item);
|
||||
bool KeyRingCheck(uint32 item);
|
||||
void AddPVPPoints(uint32 points);
|
||||
void AddCrystals(uint32 radiant, uint32 ebon);
|
||||
void AddCrystals(uint32 radiant_count, uint32 ebon_count);
|
||||
void SetEbonCrystals(uint32 value);
|
||||
void SetRadiantCrystals(uint32 value);
|
||||
uint32 GetPVPPoints();
|
||||
|
||||
@ -1162,19 +1162,17 @@ void Perl_Client_AddCrystals(Client* self, uint32 radiant_count, uint32 ebon_cou
|
||||
if (ebon_count != 0) {
|
||||
if (ebon_count > 0) {
|
||||
self->AddEbonCrystals(ebon_count);
|
||||
return;
|
||||
} else {
|
||||
self->RemoveEbonCrystals(ebon_count);
|
||||
}
|
||||
|
||||
self->RemoveEbonCrystals(ebon_count);
|
||||
}
|
||||
|
||||
if (radiant_count != 0) {
|
||||
if (radiant_count > 0) {
|
||||
self->AddRadiantCrystals(radiant_count);
|
||||
return;
|
||||
} else {
|
||||
self->RemoveRadiantCrystals(radiant_count);
|
||||
}
|
||||
|
||||
self->RemoveRadiantCrystals(radiant_count);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user