Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed target msg #269

Merged
merged 4 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions data/dictionaries/dictionary.CSY
Original file line number Diff line number Diff line change
Expand Up @@ -3683,6 +3683,7 @@
8212=Neplatná syntaxe příkazu pro opakované přidávání objektů: 'radd [hexID/decimalID], 'radditem [itemSection], 'raddnpc [npcSection]
8213=ID sekce z DFNs objekt pochází z
8214=Dá se předmět ukrást? 0 = nelze ukrást, 1 = lze ukrást, 2 = lze ukrást vzácně
8215=Neplatný cíl. Vyberte platnou položku nebo NPC
// [8300-8499] Tweak menu - Character property descriptions
8300=Číslo účtu přidružené k hráči. Řízeno serverem (pouze pro čtení)
8301=Typ umělé inteligence NPC
Expand Down
1 change: 1 addition & 0 deletions data/dictionaries/dictionary.ENG
Original file line number Diff line number Diff line change
Expand Up @@ -3683,6 +3683,7 @@
8212=Valid command syntax for repeating adding objects: 'radd [hexID/decimalID], 'radditem [itemSection], 'raddnpc [npcSection]
8213=Section ID from DFNs object originated from
8214=Is item stealable? 0 = not stealable, 1 = stealable, 2 = stealable rare
8215=Invalid target. Please select a valid item or NPC
// [8300-8499] Tweak menu - Character property descriptions
8300=Account number associated with player. Controlled by server (Read-Only)
8301=NPC AI Type
Expand Down
1 change: 1 addition & 0 deletions data/dictionaries/dictionary.FRE
Original file line number Diff line number Diff line change
Expand Up @@ -3847,6 +3847,7 @@
8212=Syntaxe de commande valide pour l'ajout répété d'objets : 'radd [hexID/decimalID], 'radditem [itemSection], 'raddnpc [npcSection].
8213=Identification de la section dans les DFNs d'où provient l'objet.
8214=L'objet est-il volable ? 0 = non volable, 1 = volable, 2 = volable rare
8215=Cible invalide. Veuillez sélectionner un objet ou un PNJ valide
// [8300-8499] Tweak menu - Character property descriptions
8300=Numéro de compte associé au joueur. Contrôlé par le serveur (en lecture seule).
8301=Type d'IA du PNJ
Expand Down
1 change: 1 addition & 0 deletions data/dictionaries/dictionary.GER
Original file line number Diff line number Diff line change
Expand Up @@ -3683,6 +3683,7 @@
8212=Ungültige Befehlssyntax für wiederholtes Hinzufügen von Objekten: 'radd [hexID/decimalID], 'radditem [itemSection], 'raddnpc [npcSection]
8213=Schnittstellen-ID aus DFNs, aus denen das Objekt stammt
8214=Ist der Gegenstand stehlbar? 0 = nicht stehlbar, 1 = stehlbar, 2 = selten stehlbar
8215=Ungültiges Ziel. Bitte wählen Sie einen gültigen Gegenstand oder NPC aus
// [8300-8499] Tweak menu - Character property descriptions
8300=Kontonummer, die dem Spieler zugeordnet ist. Wird vom Server gesteuert (Read-Only)
8301=NPC-KI-Typ
Expand Down
1 change: 1 addition & 0 deletions data/dictionaries/dictionary.ITA
Original file line number Diff line number Diff line change
Expand Up @@ -3683,6 +3683,7 @@
8212=Sintassi comando non valida per ripetere l'aggiunta di oggetti: 'radd [hexID/decimalID], 'radditem [itemSection], 'raddnpc [npcSection]
8213=Identità della sezione da cui proviene l'oggetto DFN
8214=L'oggetto è rubabile? 0 = non rubabile, 1 = rubabile, 2 = rubabile raramente
8215=Destinazione non valida. Seleziona un oggetto o NPC valido
// [8300-8499] Tweak menu - Character property descriptions
8300=Numero di account associato al giocatore. Controllato dal server (Solo lettura)
8301=Tipo di IA del PNG
Expand Down
1 change: 1 addition & 0 deletions data/dictionaries/dictionary.POL
Original file line number Diff line number Diff line change
Expand Up @@ -3683,6 +3683,7 @@
8212=Nieprawidłowa składnia polecenia powtarzającego dodawanie obiektów: 'radd [hexID/decimalID], 'radditem [itemSection], 'raddnpc [npcSection]
8213=Identyfikator sekcji z DFN, z którego pochodzi obiekt
8214=Czy przedmiot można ukraść? 0 = nie można ukraść, 1 = można ukraść, 2 = można ukraść rzadko
8215=Nieprawidłowy cel. Wybierz prawidłowy przedmiot lub NPC
// [8300-8499] Menu ustawień - opisy właściwości znaków
8300=Numer konta powiązanego z graczem. Kontrolowany przez serwer (tylko do odczytu)
8301=Typ SI NPC
Expand Down
1 change: 1 addition & 0 deletions data/dictionaries/dictionary.PTG
Original file line number Diff line number Diff line change
Expand Up @@ -3683,6 +3683,7 @@
8212=Sintaxe de comando válida para repetir a adição de objectos: 'radd [hexID/decimalID], 'radditem [itemSecção], 'raddnpc [npcSecção]
8213=Secção ID do objecto do DFN originado de
8214=O artigo pode ser roubado? 0 = não pode ser roubado, 1 = pode ser roubado, 2 = pode ser roubado raramente
8215=Alvo inválido. Selecione um item ou NPC válido
// [8300-8499] Tweak menu - Character property descriptions
8300=Número de conta associado ao jogador. Controlado por servidor (Read-Only)
8301=NPC Tipo de IA
Expand Down
1 change: 1 addition & 0 deletions data/dictionaries/dictionary.SPA
Original file line number Diff line number Diff line change
Expand Up @@ -3683,6 +3683,7 @@
8212=Sintaxis de comando válida para repetir la adición de objetos: 'radd [hexID/decimalID], 'radditem [itemSection], 'raddnpc [npcSection]
8213=Identificación de la sección de DFNs de la que procede el objeto
8214=¿Se puede robar el objeto? 0 = no robable, 1 = robable, 2 = robable raro
8215=Alvo inválido. Selecione um item ou NPC válido
// [8300-8499] Menú de ajustes - Descripciones de las propiedades de los personajes
8300=Número de cuenta asociado al jugador. Controlado por el servidor (sólo lectura)
8301=Tipo de IA del PNJ
Expand Down
1 change: 1 addition & 0 deletions data/dictionaries/dictionary.ZRO
Original file line number Diff line number Diff line change
Expand Up @@ -3678,6 +3678,7 @@
8212=Valid command syntax for repeating adding objects: 'radd [hexID/decimalID], 'radditem [itemSection], 'raddnpc [npcSection]
8213=Section ID from DFNs object originated from
8214=Is item stealable? 0 = not stealable, 1 = stealable, 2 = stealable rare
8215=Invalid target. Please select a valid item or NPC
// [8300-8499] Tweak menu - Character property descriptions
8300=Account number associated with player. Controlled by server (Read-Only)
8301=NPC AI Type
Expand Down
22 changes: 17 additions & 5 deletions data/js/commands/targeting/dupe.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ function command_DUPE( socket, cmdString )

function onCallback0( socket, ourObj )
{
var targMsg = GetDictionaryEntry( 38, socket.language );

var cancelCheck = parseInt( socket.GetByte( 11 ));
if( cancelCheck == 255 )
return;
Expand All @@ -39,7 +41,7 @@ function onCallback0( socket, ourObj )
if( ValidateObject( newSpawner ))
{
newSpawner.spawnsection = ourObj.spawnsection;
if( ourObj.sectionalist )
if( ourObj.sectionalist )
{
newSpawner.sectionalist = true;
}
Expand All @@ -60,7 +62,7 @@ function onCallback0( socket, ourObj )
}
else
{
socket.SysMessage( GetDictionaryEntry( 8077, socket.language )); // Failed to dupe item.
socket.SysMessage(GetDictionaryEntry( 8077, socket.language )); // Failed to dupe item.
return;
}
}
Expand All @@ -69,9 +71,19 @@ function onCallback0( socket, ourObj )
ourObj.Dupe( socket );
}
}
var tempMsg = GetDictionaryEntry( 8078, socket.language ); // %i duped items have been placed in your backpack.
socket.SysMessage( tempMsg.replace( /%i/gi, numToDupe.toString() ));
socket.tempint = 0;
}
else
{
socket.SysMessage( GetDictionaryEntry( 8215, socket.language )); // Invalid target. Please select a valid item or NPC
socket.CustomTarget( 0, targMsg );
}
}
var tempMsg = GetDictionaryEntry( 8078, socket.language ); // %i duped items have been placed in your backpack.
socket.SysMessage( tempMsg.replace( /%i/gi, numToDupe.toString() ));
socket.tempint = 0;
else
{
socket.SysMessage( GetDictionaryEntry( 8215, socket.language )); // Invalid target. Please select a valid item or NPC
socket.CustomTarget( 0, targMsg );
}
}
3 changes: 3 additions & 0 deletions source/Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
15/04/2024 - Dragon Slayer
Fixed Dupe command message when targeting something other then a item or npc. (js dupe)

06/04/2024 - Dragon Slayer
Fixed Runebook Cooldown:
The Runebook now uses GetCurrentClock() instead of a timer, ensuring accurate checks for a 7-second delay using the system clock of the server. (js runebook)
Expand Down
4 changes: 4 additions & 0 deletions source/cBaseObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2550,6 +2550,10 @@ void CBaseObject::CopyData( CBaseObject *target )
target->SetKills( kills );
target->SetWipeable( IsWipeable() );
target->SetDamageable( IsDamageable() );

// Don't forget to copy the tags
target->tags = GetTagMap();
target->tempTags = GetTempTagMap();
}

Point3_st CBaseObject::GetOldLocation( void )
Expand Down